CMake: Find ZLIB before gRPC in the standalone examples
...like we do with OpenSSL. And we already did the same fix for tests.
The standalone gRPC server examples find gRPC inside a block that sets
CMAKE_FIND_PACKAGE_PREFER_CONFIG to TRUE. gRPC's package config exports
gRPC::grpc with ZLIB::ZLIB in its link interface, but only resolves that
target itself via a guarded "if(NOT ZLIB_FOUND) find_package(ZLIB)".
Find ZLIB up front in MODULE mode, before enabling
CMAKE_FIND_PACKAGE_PREFER_CONFIG, so that ZLIB::ZLIB exists in the
consuming scope before gRPC is found. This mirrors the existing OpenSSL
handling and the same fix already done for the standalone tests.
Pick-to: 6.12
Change-Id: I63f74abc0b1798ffd73181a7ad716415ce8c1bb6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>