BUG/MINOR: compression: consider the expansion factor in init

When checking if the buffer is large enough, we used to rely on a fixed
size that was "apparently" enough. We need to consider the expansion
factor of deflate-encoded streams instead, which is of 5 bytes per 32kB.
The previous value was OK till 128kB buffers but became wrong past that.
It's totally harmless since we always keep the reserve when compressiong,
so there's 1kB or so available, which is enough for buffers as large as
6.5 MB, but better fix the check anyway.

This fix could be backported into 1.5 since compression was added there.
diff --git a/src/compression.c b/src/compression.c
index 95272fb..074902e 100644
--- a/src/compression.c
+++ b/src/compression.c
@@ -124,8 +124,11 @@
  */
 int http_compression_buffer_init(struct session *s, struct buffer *in, struct buffer *out)
 {
-	/* not enough space */
-	if (in->size - buffer_len(in) < 42)
+	/* output stream requires at least 10 bytes for the gzip header, plus
+	 * at least 8 bytes for the gzip trailer (crc+len), plus a possible
+	 * plus at most 5 bytes per 32kB block and 2 bytes to close the stream.
+	 */
+	if (in->size - buffer_len(in) < 20 + 5 * ((in->i + 32767) >> 15))
 		return -1;
 
 	/* prepare an empty output buffer in which we reserve enough room for