Avoid sending empty chunks in gzip streaming before end of payload

This fixes a parsing issue I'm having in SciDB-Py, where python truncates compressed payloads because it sees the terminating chunk `0\r\n\r\n` before the end of file