MINOR: connection: use proxy protocol as parameter for srv conn hash

Use the proxy protocol frame if proxy protocol is activated on the
server line. Do not add anymore these connections in the private list.
If some requests are made with the same proxy fields, they can reuse
the idle connection.

The reg-tests proxy_protocol_send_unique_id must be adapted has it
relied on the side effect behavior that every requests from a same
connection reused a private server connection. Now, a new connection is
created as expected if the proxy protocol fields differ.
diff --git a/src/backend.c b/src/backend.c
index 1ab0af8..639fbd7 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -1267,9 +1267,10 @@
 	int err;
 	struct sample *sni_smp = NULL;
 	struct sockaddr_storage *bind_addr;
+	int proxy_line_ret;
 	int64_t hash = 0;
 	struct conn_hash_params hash_params;
-	XXH64_hash_t sni_hash;
+	XXH64_hash_t sni_hash, proxy_hash;
 
 	/* first, set unique connection parameters and then calculate hash */
 	memset(&hash_params, 0, sizeof(hash_params));
@@ -1310,6 +1311,15 @@
 
 	hash_params.src_addr = bind_addr;
 
+	/* 4. proxy protocol */
+	if (srv && srv->pp_opts) {
+		proxy_line_ret = make_proxy_line(trash.area, trash.size, srv, cli_conn, s);
+		if (proxy_line_ret) {
+			proxy_hash = conn_hash_prehash(trash.area, proxy_line_ret);
+			hash_params.proxy_prehash = &proxy_hash;
+		}
+	}
+
 	if (srv)
 		hash = conn_calculate_hash(&hash_params);
 
@@ -1535,7 +1545,6 @@
 		srv_conn->send_proxy_ofs = 0;
 
 		if (srv && srv->pp_opts) {
-			conn_set_private(srv_conn);
 			srv_conn->flags |= CO_FL_SEND_PROXY;
 			srv_conn->send_proxy_ofs = 1; /* must compute size */
 			if (cli_conn)