CLEANUP: backend: factor out objt_server() in connect_server()

objt_server() is called multiple times at various places while some
places already make use of srv for this. Let's move the call at the
top of the function and use it all over the place.
diff --git a/src/backend.c b/src/backend.c
index 35ff175..d55434d 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -1029,6 +1029,7 @@
 	int reuse = 0;
 	int err;
 
+	srv = objt_server(s->target);
 	srv_conn = objt_conn(s->si[1].end);
 	if (srv_conn)
 		reuse = s->target == srv_conn->target;
@@ -1039,7 +1040,6 @@
 		 * we don't need to disable connection reuse on no-idempotent
 		 * requests nor when PROXY protocol is used.
 		 */
-		srv = objt_server(s->target);
 		if (srv && srv->conn_src.opts & CO_SRC_BIND) {
 			if ((srv->conn_src.opts & CO_SRC_TPROXY_MASK) == CO_SRC_TPROXY_DYN)
 				reuse = 0;
@@ -1065,8 +1065,8 @@
 		srv_conn->target = s->target;
 
 		/* set the correct protocol on the output stream interface */
-		if (objt_server(s->target)) {
-			conn_prepare(srv_conn, protocol_by_family(srv_conn->addr.to.ss_family), objt_server(s->target)->xprt);
+		if (srv) {
+			conn_prepare(srv_conn, protocol_by_family(srv_conn->addr.to.ss_family), srv->xprt);
 		}
 		else if (obj_type(s->target) == OBJ_TYPE_PROXY) {
 			/* proxies exclusively run on raw_sock right now */
@@ -1079,7 +1079,7 @@
 
 		/* process the case where the server requires the PROXY protocol to be sent */
 		srv_conn->send_proxy_ofs = 0;
-		if (objt_server(s->target) && objt_server(s->target)->pp_opts) {
+		if (srv && srv->pp_opts) {
 			srv_conn->send_proxy_ofs = 1; /* must compute size */
 			cli_conn = objt_conn(strm_orig(s));
 			if (cli_conn)
@@ -1112,7 +1112,6 @@
 	/* set connect timeout */
 	s->si[1].exp = tick_add_ifset(now_ms, s->be->timeout.connect);
 
-	srv = objt_server(s->target);
 	if (srv) {
 		s->flags |= SF_CURR_SESS;
 		srv->cur_sess++;