MINOR: htx: make htx_add_data() return the transmitted byte count

In order to later allow htx_add_data() to transmit partial blocks and
avoid defragmenting the buffer, we'll need to return the number of bytes
consumed. This first modification makes the function do this and its
callers take this into account. At the moment the function still works
atomically so it returns either the block size or zero. However all
call places have been adapted to consider any value between zero and
the block size.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 6bec578..7d29a7d 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -3802,6 +3802,8 @@
 	}
 
 	if (htx) {
+		unsigned int sent;
+
 		block1 = htx_free_data_space(htx);
 		if (!block1) {
 			h2c->flags |= H2_CF_DEM_SFULL;
@@ -3815,10 +3817,7 @@
 		if (flen > block1)
 			flen = block1;
 
-		if (!htx_add_data(htx, ist2(b_head(&h2c->dbuf), flen))) {
-			h2c->flags |= H2_CF_DEM_SFULL;
-			goto fail;
-		}
+		sent = htx_add_data(htx, ist2(b_head(&h2c->dbuf), flen));
 
 		b_del(&h2c->dbuf, flen);
 		h2c->dfl    -= flen;
@@ -3829,6 +3828,12 @@
 			h2s->body_len -= flen;
 			htx->extra = h2s->body_len;
 		}
+
+		if (sent < flen) {
+			h2c->flags |= H2_CF_DEM_SFULL;
+			goto fail;
+		}
+
 		goto try_again;
 	}
 	else if (unlikely(b_space_wraps(csbuf) &&