contrib: build zlib with CMake
And not a home made build system which doesn't allow out of tree builds.
Extracted from !2514 (merged)
Draft on top of !2576 (merged)
v4:
- split build and install steps to fix dependency issues (emscripten failure)
- rebased
Edited by Steve Lhomme