Tests: Cleanup CMake_TEST_XCODE_VERSION code
- Consolidate calls to xcodebuild -version
- Handles cases where CMake_TEST_XCODE_VERSION is 0 to allow running tests with only command-line tools.
- Architecture test supports Xcode 10+
Topic-rename: tests-xcodebuild-version-scleanup
Edited by Juan Ramos