Compression: Properly close gzip/deflate.

The previous patch did not work properly work, if the response was
written using several writes.

This calls close on the writer after it has been applied. Still a bit
fragile, but should work unless another filter overrides the
responsewriter after compression.