BUG/MEDIUM: tcp: fix outgoing polling based on proxy protocol

During a tcp connection setup in tcp_connect_server(), we check if
there are pending data to start polling for writes immediately. We
also use the same test to know if we can disable the quick ack and
merge the first data packet with the connection's ACK. This last
case is also valid for the proxy protocol.

The problem lies in the way it's done, as the "data" variable is
improperly completed with the presence of the proxy protocol, resulting
in the connection being polled for data writes if the proxy protocol is
enabled. It's not a big issue per se, except that the proxy protocol
uses the fact that we're polling for data to know if it can use MSG_MORE.

This causes no problem on HTTP/HTTPS, but with banner protocols, it
introduces a 200ms delay if the server waits for the PROXY header.

This has been caused by the connection management changes introduced in
1.5-dev12, specifically commit a1a7474 ("MEDIUM: proxy-proto: don't use
buffer flags in conn_si_send_proxy()"), so this fix must be backported
to 1.5.
(cherry picked from commit fb20e4668d0d3fbdcb97eacb9695659aa7ac1a54)
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index acabbcd..2aa93bb 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -450,15 +450,12 @@
 		}
 	}
 
-	/* if a send_proxy is there, there are data */
-	data |= conn->send_proxy_ofs;
-
 #if defined(TCP_QUICKACK)
 	/* disabling tcp quick ack now allows the first request to leave the
 	 * machine with the first ACK. We only do this if there are pending
 	 * data in the buffer.
 	 */
-	if (delack == 2 || ((delack || data) && (be->options2 & PR_O2_SMARTCON)))
+	if (delack == 2 || ((delack || data || conn->send_proxy_ofs) && (be->options2 & PR_O2_SMARTCON)))
                 setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, &zero, sizeof(zero));
 #endif