CoreFoundation: fix CoreFoundation for Foundation static builds
CoreFoundation: fix CoreFoundation for Foundation static builds

CoreFoundation built statically for Foundation is used as an objects
library.  We want to re-export the symbols.  This requires that exports
are enabled for the target, but CMake defines _EXPORT symbols only for
shared libraries and `-rdynamic` executables.  Use the custom macro for
the static case for Foundation.

parkera/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,e78l/swift-corelibs-foundation,e78l/swift-corelibs-foundation,parkera/swift-corelibs-foundation,e78l/swift-corelibs-foundation,e78l/swift-corelibs-foundation,apple/swift-corelibs-foundation,parkera/swift-corelibs-foundation,parkera/swift-corelibs-foundation,parkera/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,e78l/swift-corelibs-foundation