MEDIUM: tree-wide: Change sc API to specify required free space to progress

sc_need_room() now takes the required free space to receive more data as
parameter. All calls to this function are updated accordingly. For now, this
value is set but not used. When we are waiting for a buffer, 0 is used. So
we expect to be unblocked ASAP. However this must be reviewed because
SC_FL_NEED_BUF is probably enough in this case and this flag is already set
if the input buffer allocation fails.
diff --git a/src/stconn.c b/src/stconn.c
index cb3d750..615a97c 100644
--- a/src/stconn.c
+++ b/src/stconn.c
@@ -609,7 +609,7 @@
 
 	if (ic->pipe) {
 		/* stop reading */
-		sc_need_room(sc);
+		sc_need_room(sc, -1);
 	}
 	else {
 		/* (re)start reading */
@@ -1269,7 +1269,7 @@
 			/* the pipe is full or we have read enough data that it
 			 * could soon be full. Let's stop before needing to poll.
 			 */
-			sc_need_room(sc);
+			sc_need_room(sc, 0);
 			goto done_recv;
 		}
 
@@ -1339,7 +1339,7 @@
 			 */
 			BUG_ON(c_empty(ic));
 
-			sc_need_room(sc);
+			sc_need_room(sc, channel_recv_max(ic) + 1);
 			/* Add READ_PARTIAL because some data are pending but
 			 * cannot be xferred to the channel
 			 */
@@ -1353,7 +1353,7 @@
 			 * here to proceed.
 			 */
 			if (flags & CO_RFL_BUF_FLUSH)
-				sc_need_room(sc);
+				sc_need_room(sc, -1);
 			break;
 		}