[MAJOR] kill CL_STINSPECT and CL_STHEADERS (step 1)

This is a first attempt at separating data processing from the
TCP state machine. Those two states have been replaced with flags
in the session indicating what needs to be analyzed. The corresponding
code is still called before and in lieu of TCP states.

Next change should get rid of the specific SV_STANALYZE which is in
fact a client state.

Then next change should consist in making it possible to analyze
TCP contents while being in CL_STDATA (or CL_STSHUT*).
diff --git a/include/types/proto_http.h b/include/types/proto_http.h
index 713da49..546564b 100644
--- a/include/types/proto_http.h
+++ b/include/types/proto_http.h
@@ -32,12 +32,10 @@
  */
 
 /* different possible states for the client side */
-#define CL_STINSPECT	0
-#define CL_STHEADERS	1
-#define CL_STDATA	2
-#define CL_STSHUTR	3
-#define CL_STSHUTW	4
-#define CL_STCLOSE	5
+#define CL_STDATA	0
+#define CL_STSHUTR	1
+#define CL_STSHUTW	2
+#define CL_STCLOSE	3
 
 /* different possible states for the server side */
 #define SV_STIDLE	0
diff --git a/include/types/session.h b/include/types/session.h
index 5bcd0d7..c94401a 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -82,6 +82,18 @@
  * and freed in session_free() !
  */
 
+/* analysis flags */
+#define AN_REQ_INSPECT          0x00000001  /* inspect request contents */
+#define AN_REQ_HTTP_HDR         0x00000002  /* inspect HTTP request headers */
+#define AN_REQ_HTTP_BODY        0x00000004  /* inspect HTTP request body */
+#define AN_REQ_ANY              (AN_REQ_INSPECT|AN_REQ_HTTP_HDR|AN_REQ_HTTP_BODY)
+
+#define AN_RTR_INSPECT          0x00000008  /* inspect response contents */
+#define AN_RTR_HTTP_HDR         0x00000010  /* inspect HTTP response headers */
+#define AN_RTR_HTTP_BODY        0x00000020  /* inspect HTTP response body */
+#define AN_RTR_ANY              (AN_RTR_INSPECT|AN_RTR_HTTP_HDR|AN_RTR_HTTP_BODY)
+
+
 /*
  * Note: some session flags have dependencies :
  *  - SN_DIRECT cannot exist without SN_ASSIGNED, because a server is
@@ -105,6 +117,7 @@
 	int srv_state;				/* state of the server side */
 	int conn_retries;			/* number of connect retries left */
 	int flags;				/* some flags describing the session */
+	unsigned int analysis;			/* bit field indicating remaining analysis to perform on data */
 	struct buffer *req;			/* request buffer */
 	struct buffer *rep;			/* response buffer */
 	struct sockaddr_storage cli_addr;	/* the client address */