MEDIUM: conn-stream: Be able to pass endpoint to create a conn-stream

It is a transient commit to prepare next changes. It is possible to pass a
pre-allocated endpoint to create a new conn-stream. If it is NULL, a new
endpoint is created, otherwise the existing one is used. There no more
change at the conn-stream level.

In the applets, all conn-stream are created with no pre-allocated
endpoint. But for multiplexers, an endpoint is systematically created before
creating the conn-stream.
diff --git a/src/conn_stream.c b/src/conn_stream.c
index 0335cbb..5b81774 100644
--- a/src/conn_stream.c
+++ b/src/conn_stream.c
@@ -46,10 +46,9 @@
 /* Tries to allocate a new conn_stream and initialize its main fields. On
  * failure, nothing is allocated and NULL is returned.
  */
-struct conn_stream *cs_new()
+struct conn_stream *cs_new(struct cs_endpoint *endp)
 {
 	struct conn_stream *cs;
-	struct cs_endpoint *endp;
 
 	cs = pool_alloc(pool_head_connstream);
 
@@ -62,9 +61,11 @@
 	cs->si = NULL;
 	cs->data_cb = NULL;
 
-	endp = cs_endpoint_new();
-	if (unlikely(!endp))
-		goto alloc_error;
+	if (!endp) {
+		endp = cs_endpoint_new();
+		if (unlikely(!endp))
+			goto alloc_error;
+	}
 	cs->endp = endp;
 
 	return cs;