zlib updates

This updates our bundled zlib and parts of CMake scripts that use it. See commit messages for details.