cmake: fix `CURL_WERROR=ON` for old CMake and use it in GHA/linux-old
- cmake: fix `-pedantic-errors` for old CMake with `CURL_WERROR=ON` set.
`-pedantic-errors` option throws a warning with GCC (all versions) and
makes `check_symbol_exists()` fail in CMake versions older than
v3.23.0 (2022-03-29), when CMake introduced a workaround:
https://gitlab.kitware.com/cmake/cmake/-/issues/13208
https://gitlab.kitware.com/cmake/cmake/-/commit/
eeb45401163d831b8c841ef6eba81466b4067b68
https://gitlab.kitware.com/cmake/cmake/-/commit/
1ab7c3cd28b27ca162c4559e1026e5cad1898ade
Follow-up to
3829759bd042c03225ae862062560f568ba1a231 #12489
- set `CURL_WERROR=ON` for the `linux-old` job in CI.
Closes #13282