zlib: allow zero values for level and strategy
zlib: level can be negative
zlib: remove unused parameter
zlib: allow custom flush type for flush()
zlib: allow changing of level and strategy
test: fix tls-hello-parser-failure on smartos

Assert that when the client closes it has seen an error, this prevents
the test from timing out.

Also queue a second write in the case that we were able to send the
buffer before the other side closed the connection.