MINOR: buffer: split bi_contig_data() into ci_contig_data and b_config_data()

This function was sometimes used from a channel and sometimes from a buffer.
In both cases it requires knowledge of the size of the output data (to skip
them). Here the split ensures the channel can deal with this point, and that
other places not having output data can continue to work.
diff --git a/include/common/buf.h b/include/common/buf.h
index fccad45..0ee9c54 100644
--- a/include/common/buf.h
+++ b/include/common/buf.h
@@ -278,6 +278,21 @@
 	return 1;
 }
 
+/* b_contig_data() : returns the amount of data that can contiguously be read
+ * at once starting from a relative offset <start> (which allows to easily
+ * pre-compute blocks for memcpy). The start point will typically contain the
+ * amount of past data already returned by a previous call to this function.
+ */
+static inline size_t b_contig_data(const struct buffer *b, size_t start)
+{
+	size_t data = b_wrap(b) - b_peek(b, start);
+	size_t limit = b_data(b) - start;
+
+	if (data > limit)
+		data = limit;
+	return data;
+}
+
 
 /*********************************************/
 /* Functions used to modify the buffer state */