CTest: MaxRecursionDepth failures

Perhaps we can change the recursion limit lookup to check an environment variable before using the compiled-in default limit. Then we can compile in the default limit even in CI builds, but set the environment variable during testing. Then in the MaxRecursionDepth test we can clear that environment variable to test the real limit.