try_compile: Propagate platform variables in project-mode too
Add policy CMP0137 to propagate both our builtin variables and those
listed by CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
to try_compile
whole-project builds.
Also add a CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES
variable to suppress this behavior for either signature.
Fixes: #23219 (closed)