Deprecate compatibility with CMake versions older than 3.5
Issue a deprecation warning on calls to cmake_minimum_required or
cmake_policy that set policies based on versions older than 3.5.
Note that the effective policy version includes ...<max> treatment.
Update the check from !4897 (merged).