zlib: check callbacks are functions
This PR attempts to resolve issue https://github.com/nodejs/node/issues/2397 It's based off the PR at: https://github.com/joyent/node/pull/6525
I have added tests too. This is my first contribution so please let me know if I missed something out.