Add gzip support

The server now compresses text files before sending them to safe
traffic. It uses zlib.

Please note that it hasn't been thoroughly tested but it seems to work
fine.