BUG/MAJOR: vars: always retrieve the stream and session from the sample

This is the continuation of previous patch called "BUG/MAJOR: samples:
check smp->strm before using it".

It happens that variables may have a session-wide scope, and that their
session is retrieved by dereferencing the stream. But nothing prevents them
from being used from a streamless context such as tcp-request connection,
thus crashing the process. Example :

    tcp-request connection accept if { src,set-var(sess.foo) -m found }

In order to fix this, we have to always ensure that variable manipulation
only happens via the sample, which contains the correct owner and context,
and that we never use one from a different source. This results in quite a
large change since a lot of functions are inderctly involved in the call
chain, but the change is easy to follow.

This fix must be backported to 1.6, and requires the last two patches.
diff --git a/include/proto/vars.h b/include/proto/vars.h
index 9299b9f..de0987d 100644
--- a/include/proto/vars.h
+++ b/include/proto/vars.h
@@ -4,11 +4,11 @@
 #include <types/vars.h>
 
 void vars_init(struct vars *vars, enum vars_scope scope);
-void vars_prune(struct vars *vars, struct stream *strm);
+void vars_prune(struct vars *vars, struct session *sess, struct stream *strm);
 void vars_prune_per_sess(struct vars *vars);
-int vars_get_by_name(const char *name, size_t len, struct stream *strm, struct sample *smp);
-void vars_set_by_name(const char *name, size_t len, struct stream *strm, struct sample *smp);
-int vars_get_by_desc(const struct var_desc *var_desc, struct stream *strm, struct sample *smp);
+int vars_get_by_name(const char *name, size_t len, struct sample *smp);
+void vars_set_by_name(const char *name, size_t len, struct sample *smp);
+int vars_get_by_desc(const struct var_desc *var_desc, struct sample *smp);
 int vars_check_arg(struct arg *arg, char **err);
 
 #endif