[MINOR] maintain a global session list in order to ease debugging

Now the global variable 'sessions' will be a dual-linked list of all
known sessions. The list element is set at the beginning of the session
so that it's easier to follow them all with gdb.
diff --git a/src/client.c b/src/client.c
index d56a33e..78387a1 100644
--- a/src/client.c
+++ b/src/client.c
@@ -53,7 +53,7 @@
 /*
  * FIXME: This should move to the STREAM_SOCK code then split into TCP and HTTP.
  */
-    
+
 /*
  * this function is called on a read event from a listen socket, corresponding
  * to an accept. It tries to accept as many connections as possible.
@@ -106,6 +106,8 @@
 			goto out_close;
 		}
 
+		LIST_ADDQ(&sessions, &s->list);
+
 		s->flags = 0;
 		s->term_trace = 0;
 
@@ -455,6 +457,7 @@
  out_free_task:
 	pool_free2(pool2_task, t);
  out_free_session:
+	LIST_DEL(&s->list);
 	pool_free2(pool2_session, s);
  out_close:
 	close(cfd);