MEDIUM: stream-int: make si_sess() use the stream int's side

This one relies on the SI's side to find the pointer to the session.
That the stream interface doesn't have to look at the task's context
anymore.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index cc79e6d..4d5abcf 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -64,6 +64,15 @@
 		return &LIST_ELEM(si, struct session *, si[0])->res;
 }
 
+/* returns the session associated to a stream interface */
+static inline struct session *si_sess(struct stream_interface *si)
+{
+	if (si->flags & SI_FL_ISBACK)
+		return LIST_ELEM(si, struct session *, si[1]);
+	else
+		return LIST_ELEM(si, struct session *, si[0]);
+}
+
 /* Initializes all required fields for a new appctx. Note that it does the
  * minimum acceptable initialization for an appctx. This means only the
  * 3 integer states st0, st1, st2 are zeroed.
@@ -365,12 +374,6 @@
 	return ret;
 }
 
-/* finds the session which owns a stream interface */
-static inline struct session *si_sess(struct stream_interface *si)
-{
-	return (struct session *)((struct task *)si->owner)->context;
-}
-
 /* for debugging, reports the stream interface state name */
 static inline const char *si_state_str(int state)
 {