MEDIUM: stream-interface: introduce si_attach_conn to replace si_prepare_conn

si_prepare_conn() is not appropriate in our case as it both initializes and
attaches the connection to the stream interface. Due to the asymmetry between
accept() and connect(), it causes some fields such as the control and transport
layers to be reinitialized.

Now that we can separately initialize these fields using conn_prepare(), let's
break this function to only attach the connection to the stream interface.

Also, by analogy, si_prepare_none() was renamed si_detach(), and
si_prepare_applet() was renamed si_attach_applet().
diff --git a/src/backend.c b/src/backend.c
index 65cbcb6..a06a332 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -997,17 +997,19 @@
 
 	/* set the correct protocol on the output stream interface */
 	if (objt_server(s->target)) {
-		si_prepare_conn(s->req->cons, objt_server(s->target)->proto, objt_server(s->target)->xprt);
+		conn_prepare(srv_conn, objt_server(s->target)->proto, objt_server(s->target)->xprt);
 	}
 	else if (obj_type(s->target) == OBJ_TYPE_PROXY) {
 		/* proxies exclusively run on raw_sock right now */
-		si_prepare_conn(s->req->cons, protocol_by_family(srv_conn->addr.to.ss_family), &raw_sock);
+		conn_prepare(srv_conn, protocol_by_family(srv_conn->addr.to.ss_family), &raw_sock);
 		if (!objt_conn(s->req->cons->end) || !objt_conn(s->req->cons->end)->ctrl)
 			return SN_ERR_INTERNAL;
 	}
 	else
 		return SN_ERR_INTERNAL;  /* how did we get there ? */
 
+	si_attach_conn(s->req->cons, srv_conn);
+
 	/* process the case where the server requires the PROXY protocol to be sent */
 	s->req->cons->send_proxy_ofs = 0;
 	if (objt_server(s->target) && (objt_server(s->target)->state & SRV_SEND_PROXY)) {