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.
3 files changed