Convert ext/zlib to HNI

I also refactored the qlibz and snappy functions so that they're only included if they can actually be compiled in.

Part of #1480