REORG/MAJOR: session: rename the "session" entity to "stream"

With HTTP/2, we'll have to support multiplexed streams. A stream is in
fact the largest part of what we currently call a session, it has buffers,
logs, etc.

In order to catch any error, this commit removes any reference to the
struct session and tries to rename most "session" occurrences in function
names to "stream" and "sess" to "strm" when that's related to a session.

The files stream.{c,h} were added and session.{c,h} removed.

The session will be reintroduced later and a few parts of the stream
will progressively be moved overthere. It will more or less contain
only what we need in an embryonic session.

Sample fetch functions and converters will have to change a bit so
that they'll use an L5 (session) instead of what's currently called
"L4" which is in fact L6 for now.

Once all changes are completed, we should see approximately this :

   L7 - http_txn
   L6 - stream
   L5 - session
   L4 - connection | applet

There will be at most one http_txn per stream, and a same session will
possibly be referenced by multiple streams. A connection will point to
a session and to a stream. The session will hold all the information
we need to keep even when we don't yet have a stream.

Some more cleanup is needed because some code was already far from
being clean. The server queue management still refers to sessions at
many places while comments talk about connections. This will have to
be cleaned up once we have a server-side connection pool manager.
Stream flags "SN_*" still need to be renamed, it doesn't seem like
any of them will need to move to the session.
diff --git a/src/frontend.c b/src/frontend.c
index 48dabe8..b793ff8 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -42,17 +42,17 @@
 #include <proto/proto_http.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
-#include <proto/session.h>
+#include <proto/stream.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
-/* Finish a session accept() for a proxy (TCP or HTTP). It returns a negative
+/* Finish a stream accept() for a proxy (TCP or HTTP). It returns a negative
  * value in case of a critical failure which must cause the listener to be
  * disabled, a positive value in case of success, or zero if it is a success
- * but the session must be closed ASAP (eg: monitoring). It only supports
- * sessions with a connection in si[0].
+ * but the stream must be closed ASAP (eg: monitoring). It only supports
+ * streams with a connection in si[0].
  */
-int frontend_accept(struct session *s)
+int frontend_accept(struct stream *s)
 {
 	struct connection *conn = __objt_conn(s->si[0].end);
 	int cfd = conn->t.sock.fd;
@@ -69,7 +69,7 @@
 	/* FIXME: the logs are horribly complicated now, because they are
 	 * defined in <p>, <p>, and later <be> and <be>.
 	 */
-	s->do_log = sess_log;
+	s->do_log = strm_log;
 
 	/* default error reporting function, may be changed by analysers */
 	s->srv_error = default_srv_error;
@@ -218,7 +218,7 @@
 
 /* set temp integer to the id of the frontend */
 static int
-smp_fetch_fe_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
+smp_fetch_fe_id(struct proxy *px, struct stream *l4, void *l7, unsigned int opt,
                 const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_SESS;
@@ -232,7 +232,7 @@
  * an undefined behaviour.
  */
 static int
-smp_fetch_fe_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
+smp_fetch_fe_sess_rate(struct proxy *px, struct stream *l4, void *l7, unsigned int opt,
                        const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;
@@ -246,7 +246,7 @@
  * an undefined behaviour.
  */
 static int
-smp_fetch_fe_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
+smp_fetch_fe_conn(struct proxy *px, struct stream *l4, void *l7, unsigned int opt,
                   const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	smp->flags = SMP_F_VOL_TEST;