[SYCL] Re-apply 'Fix compiler version detection for oneAPI' (#22161)
Reapply https://github.com/intel/llvm/pull/22131 with a minor change
adding a check for `SYCL_TEST_E2E_STANDALONE` before checking
`CMAKE_CXX_COMPILER_ID`.
I manually reproduced the problem that caused it to be reverted and
verified the fix.