MAJOR: sample: don't pass l7 anymore to sample fetch functions

All of them can now retrieve the HTTP transaction *if it exists* from
the stream and be sure to get NULL there when called with an embryonic
session.

The patch is a bit large because many locations were touched (all fetch
functions had to have their prototype adjusted). The opportunity was
taken to also uniformize the call names (the stream is now always "strm"
instead of "l4") and to fix indent where it was broken. This way when
we later introduce the session here there will be less confusion.
diff --git a/src/hlua.c b/src/hlua.c
index 43d9c1b..320a0bf 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2769,7 +2769,7 @@
 	memset(&smp, 0, sizeof(smp));
 
 	/* Run the sample fetch process. */
-	if (!f->process(hsmp->p, hsmp->s, hsmp->l7, 0, args, &smp, f->kw, f->private)) {
+	if (!f->process(hsmp->p, hsmp->s, 0, args, &smp, f->kw, f->private)) {
 		if (hsmp->stringsafe)
 			lua_pushstring(L, "");
 		else
@@ -3323,7 +3323,7 @@
  * return 0 if the stack does not contains free slots,
  * otherwise it returns 1.
  */
-static int hlua_txn_new(lua_State *L, struct stream *s, struct proxy *p, void *l7)
+static int hlua_txn_new(lua_State *L, struct stream *s, struct proxy *p)
 {
 	struct hlua_txn *htxn;
 
@@ -3342,7 +3342,7 @@
 
 	htxn->s = s;
 	htxn->p = p;
-	htxn->l7 = l7;
+	htxn->l7 = s->txn;
 
 	/* Create the "f" field that contains a list of fetches. */
 	lua_pushstring(L, "f");
@@ -3914,7 +3914,7 @@
  * 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, void *l7,
+static int hlua_sample_fetch_wrapper(struct proxy *px, struct stream *s,
                                      unsigned int opt, const struct arg *arg_p,
                                      struct sample *smp, const char *kw, void *private)
 {
@@ -3946,7 +3946,7 @@
 		lua_rawgeti(s->hlua.T, LUA_REGISTRYINDEX, fcn->function_ref);
 
 		/* push arguments in the stack. */
-		if (!hlua_txn_new(s->hlua.T, s, px, l7)) {
+		if (!hlua_txn_new(s->hlua.T, s, px)) {
 			send_log(px, LOG_ERR, "Lua sample-fetch '%s': full stack.", fcn->name);
 			if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 				Alert("Lua sample-fetch '%s': full stack.\n", fcn->name);
@@ -4226,7 +4226,7 @@
 		lua_rawgeti(s->hlua.T, LUA_REGISTRYINDEX, rule->fcn.function_ref);
 
 		/* Create and and push object stream in the stack. */
-		if (!hlua_txn_new(s->hlua.T, s, px, http_txn)) {
+		if (!hlua_txn_new(s->hlua.T, s, px)) {
 			send_log(px, LOG_ERR, "Lua function '%s': full stack.", rule->fcn.name);
 			if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
 				Alert("Lua function '%s': full stack.\n", rule->fcn.name);