MEDIUM: stream-int: make si_connect() return an established state when possible

si_connect() used to only return SI_ST_CON. But it already detect the
connection reuse and is the function which avoids calling connect().
So it already knows the connection is valid and reuse. Thus we make it
return SI_ST_EST when a connection is reused. This means that
connect_server() can return this state and sess_update_stream_int()
as well.

Thanks to this change, we don't need to leave process_session() in
SI_ST_CON state to immediately enter it again to switch to SI_ST_EST.
Implementing this removes one call to process_session() per request
in keep-alive mode. We're now at 2 calls per request, which is the
minimum (one for the request and another one for the response). The
number of calls to http_wait_for_response() has also dropped from 2
to one.

Tests indicate a performance gain of about 2.6% in request rate in
keep-alive mode. There should be no gain in http-server-close() since
we don't use this faster path.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 6d4da78..418fc83 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -323,24 +323,27 @@
 		ret = conn->ctrl->connect(conn, !channel_is_empty(si->ob), 0);
 		if (ret != SN_ERR_NONE)
 			return ret;
+
+		/* we need to be notified about connection establishment */
+		conn->flags |= CO_FL_WAKE_DATA;
+
+		/* we're in the process of establishing a connection */
+		si->state = SI_ST_CON;
 	}
 	else if (!channel_is_empty(si->ob)) {
 		/* reuse the existing connection, we'll have to send a
 		 * request there.
 		 */
 		conn_data_want_send(conn);
+
+		/* the connection is established */
+		si->state = SI_ST_EST;
 	}
 
 	/* needs src ip/port for logging */
 	if (si->flags & SI_FL_SRC_ADDR)
 		conn_get_from_addr(conn);
 
-	/* we need to be notified about connection establishment */
-	conn->flags |= CO_FL_WAKE_DATA;
-
-	/* we're in the process of establishing a connection */
-	si->state = SI_ST_CON;
-
 	return ret;
 }