MEDIUM: stream-interface: add a snd_buf() callback to sock_ops

This callback is used to send data from the buffer to the socket. It is
the old write_loop() call of the data layer which is used both by the
->write() callback and the ->chk_snd() function. The reason for having
it as a pointer is that it's the only remaining part which causes the
write and chk_snd() functions to be different between raw and ssl.
diff --git a/include/proto/connection.h b/include/proto/connection.h
index 2ecdfd3..07568aa 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -37,6 +37,16 @@
 		conn->data->close(conn);
 }
 
+/* Calls the snd_buf() function of the data layer if any, otherwise
+ * returns 0.
+ */
+static inline int conn_data_snd_buf(struct connection *conn)
+{
+	if (!conn->data->snd_buf)
+		return 0;
+	return conn->data->snd_buf(conn);
+}
+
 /* set polling depending on the change between the CURR part of the
  * flags and the new flags in connection C. The connection flags are
  * updated with the new flags at the end of the operation. Only the bits