Increase cmake policy version from 3.12 to 4.1 to stop using old and deprecated CMake policies in standalone builds.
Also stop overriding policy version if a cmake parent project has already set one, so parent projects are able to control which policies are enabled by default based on their own needs. Specifically, in the Bitcoin Core subtree, this change causes the libmultiprocess cmake policy version to increase from 3.12 to 3.22, which is the version Bitcoin Core uses.
This PR also adds a new newdeps CI job to test CMake 4.1 and the master branch of Cap’n Proto. This PR doesn’t change the minimum version of cmake required to build the project, which is still 3.12.
This PR is an alternative to #163 which increases the policy version to 3.31 but doesn’t include fixes for CI jobs, and doesn’t allow the bitcoin core build to choose a lower policy version. This PR is also an alternative to #175 which sets the policy version to 3.22 like the bitcoin build, but also causes builds with earlier versions of cmake to fail.