MAJOR: remove the stream interface and task management code from sock_*

The socket data layer code must only focus on moving data between a
socket and a buffer. We need a special stream interface handler to
update the stream interface and the file descriptor status.

At the moment the code works but suffers from a race condition caused
by its API : the read/write callbacks still make use of the fd instead
of using the connection. And when a double shutdown is performed, a call
to ->write() after ->read() processed an error results in dereferencing
a NULL fdtab[]->owner. This is only a temporary issue which doesn't need
to be fixed now since this will automatically go away when the functions
change to use the connection instead.
diff --git a/src/connection.c b/src/connection.c
index 679bc89..6b84c94 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -60,6 +60,9 @@
 	}
 
  leave:
+	if (conn->flags & CO_FL_NOTIFY_SI)
+		stream_sock_update_conn(conn);
+
 	/* remove the events before leaving */
 	fdtab[fd].ev &= ~(FD_POLL_IN | FD_POLL_OUT | FD_POLL_HUP | FD_POLL_ERR);
 	return ret;