MEDIUM: connection: inform si_alloc_conn() whether existing conn is OK or not

When allocating a new connection, only the caller knows whether it's
acceptable to reuse the previous one or not. Let's pass this information
to si_alloc_conn() which will do the cleanup if the connection is not
acceptable.
diff --git a/src/backend.c b/src/backend.c
index c680777..657da9d 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -982,7 +982,7 @@
 int connect_server(struct session *s)
 {
 	struct connection *cli_conn;
-	struct connection *srv_conn = si_alloc_conn(s->req->cons);
+	struct connection *srv_conn = si_alloc_conn(s->req->cons, 0);
 	struct server *srv;
 	int err;
 
diff --git a/src/proto_http.c b/src/proto_http.c
index a459c53..a071758 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -3742,7 +3742,8 @@
 	if ((s->be->options & PR_O_HTTP_PROXY) && !(s->flags & SN_ADDR_SET)) {
 		struct connection *conn;
 
-		if (unlikely((conn = si_alloc_conn(req->cons)) == NULL)) {
+		/* Note that for now we don't reuse existing proxy connections */
+		if (unlikely((conn = si_alloc_conn(req->cons, 0)) == NULL)) {
 			txn->req.msg_state = HTTP_MSG_ERROR;
 			txn->status = 500;
 			req->analysers = 0;