MINOR: stream: link the stream to its session

Now each stream is added to the session's list of streams, so that it
will be possible to know all the streams belonging to a session, and
to know if any stream is still attached to a sessoin.
diff --git a/include/types/stream.h b/include/types/stream.h
index 227b0ff..bc18f2c 100644
--- a/include/types/stream.h
+++ b/include/types/stream.h
@@ -133,6 +133,7 @@
 					 * This is a bit field of TASK_WOKEN_* */
 
 	struct list list;               /* position in global streams list */
+	struct list by_sess;            /* position in the session's streams list */
 	struct list by_srv;             /* position in server stream list */
 	struct list back_refs;          /* list of users tracking this stream */
 	struct buffer_wait buffer_wait; /* position in the list of objects waiting for a buffer */
diff --git a/src/peers.c b/src/peers.c
index 7bf7766..249edf7 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1856,6 +1856,7 @@
 
 	/* Error unrolling */
  out_free_strm:
+	LIST_DEL(&s->by_sess);
 	LIST_DEL(&s->list);
 	pool_free2(pool2_stream, s);
  out_free_task:
diff --git a/src/stream.c b/src/stream.c
index 3a88fd4..4319667 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -135,6 +135,7 @@
 
 	/* OK, we're keeping the stream, so let's properly initialize the stream */
 	LIST_ADDQ(&streams, &s->list);
+	LIST_ADDQ(&sess->streams, &s->by_sess);
 	LIST_INIT(&s->back_refs);
 
 	LIST_INIT(&s->buffer_wait.list);
@@ -249,6 +250,7 @@
 	/* Error unrolling */
  out_fail_accept:
 	flt_stream_release(s, 0);
+	LIST_DEL(&s->by_sess);
 	LIST_DEL(&s->list);
 	pool_free2(pool2_stream, s);
 	return NULL;
@@ -348,6 +350,7 @@
 			LIST_ADDQ(&LIST_ELEM(s->list.n, struct stream *, list)->back_refs, &bref->users);
 		bref->ref = s->list.n;
 	}
+	LIST_DEL(&s->by_sess);
 	LIST_DEL(&s->list);
 	si_release_endpoint(&s->si[1]);
 	si_release_endpoint(&s->si[0]);