MEDIUM: connection: merge the send_wait and recv_wait entries

In practice all callers use the same wait_event notification for any I/O
so instead of keeping specific code to handle them separately, let's merge
them and it will allow us to create new events later.
diff --git a/include/proto/connection.h b/include/proto/connection.h
index dd37822..7e6e203 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -403,8 +403,7 @@
 	conn->proxy_netns = NULL;
 	LIST_INIT(&conn->list);
 	LIST_INIT(&conn->session_list);
-	conn->send_wait = NULL;
-	conn->recv_wait = NULL;
+	conn->subs = NULL;
 	conn->idle_time = 0;
 	conn->src = NULL;
 	conn->dst = NULL;
@@ -530,15 +529,10 @@
 
 static inline void conn_force_unsubscribe(struct connection *conn)
 {
-	if (conn->recv_wait) {
-		conn->recv_wait->events &= ~SUB_RETRY_RECV;
-		conn->recv_wait = NULL;
-	}
-	if (conn->send_wait) {
-		conn->send_wait->events &= ~SUB_RETRY_SEND;
-		conn->send_wait = NULL;
-	}
-
+	if (!conn->subs)
+		return;
+	conn->subs->events = 0;
+	conn->subs = NULL;
 }
 
 /* Releases a connection previously allocated by conn_new() */
diff --git a/include/types/connection.h b/include/types/connection.h
index d5852aa..060588f 100644
--- a/include/types/connection.h
+++ b/include/types/connection.h
@@ -64,6 +64,11 @@
 	SUB_RETRY_SEND       = 0x00000002,  /* Schedule the tasklet when we can attempt to send again */
 };
 
+/* Describes a set of subscriptions. Multiple events may be registered at the
+ * same time. The callee should assume everything not pending for completion is
+ * implicitly possible. It's illegal to change the tasklet if events are still
+ * registered.
+ */
 struct wait_event {
 	struct tasklet *tasklet;
 	int events;             /* set of enum sub_event_type above */
@@ -452,8 +457,7 @@
 	enum obj_type *target;        /* the target to connect to (server, proxy, applet, ...) */
 
 	/* second cache line */
-	struct wait_event *send_wait; /* Task to wake when we're ready to send */
-	struct wait_event *recv_wait; /* Task to wake when we're ready to recv */
+	struct wait_event *subs; /* Task to wake when awaited events are ready */
 	struct list list;             /* attach point to various connection lists (idle, ...) */
 	struct list session_list;     /* List of attached connections to a session */
 	union conn_handle handle;     /* connection handle at the socket layer */