BUG/MINOR: cache/htx: Fix the counting of data already sent by the cache applet

Since the commit 8f3c256f7 ("MEDIUM: cache/htx: Always store info about HTX
blocks in the cache"), it is possible to read info about a data block without
sending anything. It is possible because we rely on the function htx_add_data(),
which will try to add data without any defragmentation. In such case, info about
the data block are skipped but don't count in data sent.

No need to backport this patch, expect if the commit 8f3c256f7 is backported
too.
diff --git a/src/cache.c b/src/cache.c
index d63cc79..3504fba 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -898,7 +898,6 @@
 			offset = 0;
 		}
 	}
-
 	appctx->ctx.cache.offset = offset;
 	appctx->ctx.cache.next   = shblk;
 	appctx->ctx.cache.sent  += total;
@@ -918,13 +917,16 @@
 	if (!max)
 		return 0;
 
-	total = 0;
 	rem_data = 0;
-	blksz = ((appctx->ctx.cache.rem_data)
-		 ? appctx->ctx.cache.rem_data
-		 : (info & 0xfffffff));
-	if (blksz > max) {
+	if (appctx->ctx.cache.rem_data) {
+		blksz = appctx->ctx.cache.rem_data;
 		total = 0;
+	}
+	else {
+		blksz = (info & 0xfffffff);
+		total = 4;
+	}
+	if (blksz > max) {
 		rem_data = blksz - max;
 		blksz = max;
 	}
@@ -945,9 +947,6 @@
 		}
 	}
 
-	if (total && !appctx->ctx.cache.rem_data)
-		total += 4;
-
 	appctx->ctx.cache.offset   = offset;
 	appctx->ctx.cache.next     = shblk;
 	appctx->ctx.cache.sent    += total;