MEDIUM: connection: use CO_FL_WAIT_XPRT more consistently than L4/L6/HANDSHAKE

As mentioned in commit c192b0ab95 ("MEDIUM: connection: remove
CO_FL_CONNECTED and only rely on CO_FL_WAIT_*"), there is a lack of
consistency on which flags are checked among L4/L6/HANDSHAKE depending
on the code areas. A number of sample fetch functions only check for
L4L6 to report MAY_CHANGE, some places only check for HANDSHAKE and
many check both L4L6 and HANDSHAKE.

This patch starts to make all of this more consistent by introducing a
new mask CO_FL_WAIT_XPRT which is the union of L4/L6/HANDSHAKE and
reports whether the transport layer is ready or not.

All inconsistent call places were updated to rely on this one each time
the goal was to check for the readiness of the transport layer.
diff --git a/src/checks.c b/src/checks.c
index 2a495ef..233d754 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -886,7 +886,7 @@
 	}
 
 	/* the rest of the code below expects the connection to be ready! */
-	if (conn->flags & CO_FL_WAIT_L4L6 && !done)
+	if (conn->flags & CO_FL_WAIT_XPRT && !done)
 		goto wait_more_data;
 
 	/* Intermediate or complete response received.
@@ -1392,7 +1392,7 @@
 
 	default:
 		/* good connection is enough for pure TCP check */
-		if (!(conn->flags & CO_FL_WAIT_L4L6) && !check->type) {
+		if (!(conn->flags & CO_FL_WAIT_XPRT) && !check->type) {
 			if (check->use_ssl)
 				set_server_check_status(check, HCHK_STATUS_L6OK, NULL);
 			else
@@ -1477,7 +1477,7 @@
 		chk_report_conn_err(check, errno, 0);
 		task_wakeup(check->task, TASK_WOKEN_IO);
 	}
-	else if (!(conn->flags & CO_FL_HANDSHAKE) && !check->type) {
+	else if (!(conn->flags & CO_FL_WAIT_XPRT) && !check->type) {
 		/* we may get here if only a connection probe was required : we
 		 * don't have any data to send nor anything expected in response,
 		 * so the completion of the connection establishment is enough.
@@ -2285,7 +2285,7 @@
 				 * sending since otherwise we won't be woken up.
 				 */
 				__event_srv_chk_w(cs);
-				if (!(conn->flags & CO_FL_WAIT_L4_CONN) ||
+				if (!(conn->flags & CO_FL_WAIT_XPRT) ||
 				    !(check->wait_list.events & SUB_RETRY_SEND))
 					__event_srv_chk_r(cs);
 			}
@@ -2352,7 +2352,7 @@
 		 */
 		if (check->result == CHK_RES_UNKNOWN) {
 			/* good connection is enough for pure TCP check */
-			if (!(conn->flags & CO_FL_WAIT_L4L6) && !check->type) {
+			if (!(conn->flags & CO_FL_WAIT_XPRT) && !check->type) {
 				if (check->use_ssl)
 					set_server_check_status(check, HCHK_STATUS_L6OK, NULL);
 				else
@@ -2785,7 +2785,7 @@
 		next = LIST_NEXT(&next->list, struct tcpcheck_rule *, list);
 
 	if ((check->current_step || &next->list == head) &&
-	    (conn->flags & (CO_FL_WAIT_L4L6 | CO_FL_HANDSHAKE))) {
+	    (conn->flags & CO_FL_WAIT_XPRT)) {
 		/* we allow up to min(inter, timeout.connect) for a connection
 		 * to establish but only when timeout.check is set
 		 * as it may be to short for a full check otherwise
@@ -3034,7 +3034,7 @@
 				break;
 
 			/* don't do anything until the connection is established */
-			if (conn->flags & CO_FL_WAIT_L4L6)
+			if (conn->flags & CO_FL_WAIT_XPRT)
 				break;
 
 		} /* end 'connect' */
@@ -3233,7 +3233,7 @@
 	} /* end loop over double chained step list */
 
 	/* don't do anything until the connection is established */
-	if (conn->flags & CO_FL_WAIT_L4L6) {
+	if (conn->flags & CO_FL_WAIT_XPRT) {
 		/* update expire time, should be done by process_chk */
 		/* we allow up to min(inter, timeout.connect) for a connection
 		 * to establish but only when timeout.check is set