Xcode: Pass compile definitions to Swift

correct Xcode generator Swift definitions
original code was defining GCC_PREPROCESSOR_DEFINITIONS which is valid only for C languages
add definitions to SWIFT_ACTIVE_COMPILATION_CONDITIONS when Swift language is used in the target
add test in SwiftOnly

Fixes: #23637
49 jobs for !7388 with xcode_swift_definitions in 70 minutes and 53 seconds (queued for 10 seconds)
merge request