MINOR: stream-int: add si_alloc_ibuf() to ease input buffer allocation

This will supersed channel_alloc_buffer() while relying on it. It will
automatically adjust SI_FL_WAIT_ROOM on the stream-int depending on
success or failure to allocate this buffer.

It's worth noting that it could make sense to also set SI_FL_WANT_PUT
each time we do this to further simplify the code at user places such
as applets, but it would possibly not be easy to clean this flag
everywhere an rx operation stops.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 2b50c06..f3cf5e0 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -306,6 +306,26 @@
 	return cs;
 }
 
+/* Try to allocate a buffer for the stream-int's input channel. It relies on
+ * channel_alloc_buffer() for this so it abides by its rules. It returns 0 in
+ * case of failure, non-zero otherwise. The stream-int's flag SI_FL_WAIT_ROOM
+ * is cleared before trying. If no buffer are available, the requester,
+ * represented by <wait> pointer, will be added in the list of objects waiting
+ * for an available buffer, and SI_FL_WAIT_ROOM will be set on the stream-int.
+ * The requester will be responsible for calling this function to try again
+ * once woken up.
+ */
+static inline int si_alloc_ibuf(struct stream_interface *si, struct buffer_wait *wait)
+{
+	int ret;
+
+	si->flags &= ~SI_FL_WAIT_ROOM;
+	ret = channel_alloc_buffer(si_ic(si), wait);
+	if (!ret)
+		si->flags |= SI_FL_WAIT_ROOM;
+	return ret;
+}
+
 /* Release the interface's existing endpoint (connection or appctx) and
  * allocate then initialize a new appctx which is assigned to the interface
  * and returned. NULL may be returned upon memory shortage. Applet <applet>