MAJOR: sample: pass a pointer to the session to each sample fetch function

Many such function need a session, and till now they used to dereference
the stream. Once we remove the stream from the embryonic session, this
will not be possible anymore.

So as of now, sample fetch functions will be called with this :

   - sess = NULL,  strm = NULL                     : never
   - sess = valid, strm = NULL                     : tcp-req connection
   - sess = valid, strm = valid, strm->txn = NULL  : tcp-req content
   - sess = valid, strm = valid, strm->txn = valid : http-req / http-res
diff --git a/src/payload.c b/src/payload.c
index 638857c..7e254bc 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -29,7 +29,7 @@
  * used with content inspection.
  */
 static int
-smp_fetch_wait_end(struct proxy *px, struct stream *s, unsigned int opt,
+smp_fetch_wait_end(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
                    const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	if (!(opt & SMP_OPT_FINAL)) {
@@ -43,7 +43,7 @@
 
 /* return the number of bytes in the request buffer */
 static int
-smp_fetch_len(struct proxy *px, struct stream *s, unsigned int opt,
+smp_fetch_len(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
               const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	struct channel *chn;
@@ -60,7 +60,7 @@
 
 /* returns the type of SSL hello message (mainly used to detect an SSL hello) */
 static int
-smp_fetch_ssl_hello_type(struct proxy *px, struct stream *s, unsigned int opt,
+smp_fetch_ssl_hello_type(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
                          const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	int hs_len;
@@ -128,7 +128,7 @@
  * Note: this decoder only works with non-wrapping data.
  */
 static int
-smp_fetch_req_ssl_ver(struct proxy *px, struct stream *s, unsigned int opt,
+smp_fetch_req_ssl_ver(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
                       const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	int version, bleft, msg_len;
@@ -264,7 +264,7 @@
  *             - opaque hostname[name_len bytes]
  */
 static int
-smp_fetch_ssl_hello_sni(struct proxy *px, struct stream *s, unsigned int opt,
+smp_fetch_ssl_hello_sni(struct proxy *px, struct session *sess, struct stream *s, unsigned int opt,
                         const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	int hs_len, ext_len, bleft;
@@ -493,7 +493,7 @@
  * returned sample has type SMP_T_CSTR.
  */
 int
-smp_fetch_rdp_cookie(struct proxy *px, struct stream *strm, unsigned int opt,
+smp_fetch_rdp_cookie(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
                      const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	return fetch_rdp_cookie_name(strm, smp, args ? args->data.str.str : NULL, args ? args->data.str.len : 0);
@@ -501,12 +501,12 @@
 
 /* returns either 1 or 0 depending on whether an RDP cookie is found or not */
 static int
-smp_fetch_rdp_cookie_cnt(struct proxy *px, struct stream *strm, unsigned int opt,
+smp_fetch_rdp_cookie_cnt(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
                          const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
 	int ret;
 
-	ret = smp_fetch_rdp_cookie(px, strm, opt, args, smp, kw, private);
+	ret = smp_fetch_rdp_cookie(px, sess, strm, opt, args, smp, kw, private);
 
 	if (smp->flags & SMP_F_MAY_CHANGE)
 		return 0;
@@ -519,7 +519,7 @@
 
 /* extracts part of a payload with offset and length at a given position */
 static int
-smp_fetch_payload_lv(struct proxy *px, struct stream *strm, unsigned int opt,
+smp_fetch_payload_lv(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
                      const struct arg *arg_p, struct sample *smp, const char *kw, void *private)
 {
 	unsigned int len_offset = arg_p[0].data.uint;
@@ -573,7 +573,7 @@
 
 /* extracts some payload at a fixed position and length */
 static int
-smp_fetch_payload(struct proxy *px, struct stream *strm, unsigned int opt,
+smp_fetch_payload(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
                   const struct arg *arg_p, struct sample *smp, const char *kw, void *private)
 {
 	unsigned int buf_offset = arg_p[0].data.uint;