MEDIUM: proto: Change the prototype of the connect() method.

The connect() method had 2 arguments, "data", that tells if there's pending
data to be sent, and "delack" that tells if we have to use a delayed ack
inconditionally, or if the backend is configured with tcp-smart-connect.
Turn that into one argument, "flags".
That way it'll be easier to provide more informations to connect() without
adding extra arguments.
diff --git a/src/checks.c b/src/checks.c
index aeb3b79..a7b4b2f 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1545,7 +1545,7 @@
 	struct protocol *proto;
 	struct tcpcheck_rule *tcp_rule = NULL;
 	int ret;
-	int quickack;
+	int connflags = 0;
 
 	/* we cannot have a connection here */
 	if (conn)
@@ -1637,14 +1637,15 @@
 	cs_attach(cs, check, &check_conn_cb);
 
 	/* only plain tcp-check supports quick ACK */
-	quickack = check->type == 0 || check->type == PR_O2_TCPCHK_CHK;
-
-	if (tcp_rule && tcp_rule->action == TCPCHK_ACT_EXPECT)
-		quickack = 0;
+	if (check->type != 0)
+		connflags |= CONNECT_HAS_DATA;
+	if ((check->type == 0 || check->type == PR_O2_TCPCHK_CHK) &&
+	    (!tcp_rule || tcp_rule->action != TCPCHK_ACT_EXPECT))
+		connflags |= CONNECT_DELACK_ALWAYS;
 
 	ret = SF_ERR_INTERNAL;
 	if (proto && proto->connect)
-		ret = proto->connect(conn, check->type, quickack ? 2 : 0);
+		ret = proto->connect(conn, connflags);
 
 
 #ifdef USE_OPENSSL
@@ -2845,8 +2846,7 @@
 			ret = SF_ERR_INTERNAL;
 			if (proto && proto->connect)
 				ret = proto->connect(conn,
-						     1 /* I/O polling is always needed */,
-						     (next && next->action == TCPCHK_ACT_EXPECT) ? 0 : 2);
+						     CONNECT_HAS_DATA /* I/O polling is always needed */ | (next && next->action == TCPCHK_ACT_EXPECT) ? 0 : CONNECT_DELACK_ALWAYS);
 			if (check->current_step->conn_opts & TCPCHK_OPT_SEND_PROXY) {
 				conn->send_proxy_ofs = 1;
 				conn->flags |= CO_FL_SEND_PROXY;