Feature request: support store_as gzip

address #16
This patch adds support for gzip-compression of data before storing it.
Yes, only gzip.

In my ssl+kerberos+httpfs environment, this patch works fine.
Block receiver in my code example gets 2 arguments `path, data`, so `write` can use it.
But your proposal also looks good, and yours are more testable than mine.