MINOR: protocol: register the receiver's I/O handler and not the protocol's

Now we define a new sock_accept_iocb() for socket-based stream protocols
and use it as a wrapper for listener_accept() which now takes a listener
and not an FD anymore. This will allow the receiver's I/O cb to be
redefined during registration, and more specifically to get rid of the
hard-coded hacks in protocol_bind_all() made for syslog.

The previous ->accept() callback in the protocol was removed since it
doesn't have anything to do with accept() anymore but is more generic.
A few places where listener_accept() was compared against the FD's IO
callback for debugging purposes on the CLI were updated.
diff --git a/src/sock.c b/src/sock.c
index 990db23..d640190 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -27,7 +27,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/connection.h>
-#include <haproxy/listener-t.h>
+#include <haproxy/listener.h>
 #include <haproxy/log.h>
 #include <haproxy/namespace.h>
 #include <haproxy/sock.h>
@@ -613,6 +613,21 @@
 	return opt_val;
 }
 
+/* This is the FD handler IO callback for stream sockets configured for
+ * accepting incoming connections. It's a pass-through to listener_accept()
+ * which will iterate over the listener protocol's accept_conn() function.
+ * The FD's owner must be a listener.
+ */
+void sock_accept_iocb(int fd)
+{
+	struct listener *l = fdtab[fd].owner;
+
+	if (!l)
+		return;
+
+	listener_accept(l);
+}
+
 /*
  * Local variables:
  *  c-indent-level: 8