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/hlua.c b/src/hlua.c
index eebbc36..fc638ad 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2768,7 +2768,7 @@
 	memset(&smp, 0, sizeof(smp));
 
 	/* Run the sample fetch process. */
-	if (!f->process(hsmp->p, hsmp->s, 0, args, &smp, f->kw, f->private)) {
+	if (!f->process(hsmp->p, hsmp->s->sess, hsmp->s, 0, args, &smp, f->kw, f->private)) {
 		if (hsmp->stringsafe)
 			lua_pushstring(L, "");
 		else
@@ -3905,8 +3905,9 @@
  * doesn't allow "yield" functions because the HAProxy engine cannot
  * resume sample-fetches.
  */
-static int hlua_sample_fetch_wrapper(struct proxy *px, struct stream *s,
-                                     unsigned int opt, const struct arg *arg_p,
+static int hlua_sample_fetch_wrapper(struct proxy *px, struct session *sess,
+                                     struct stream *s, unsigned int opt,
+                                     const struct arg *arg_p,
                                      struct sample *smp, const char *kw, void *private)
 {
 	struct hlua_function *fcn = (struct hlua_function *)private;