[immediate] Load Foundation early enough for bridging
Foundation needs to be loaded early in the process for Swift's runtime
to properly initialize bridging support; otherwise it may cause issues
like unrecognized selectors. When scripting, load Foundation early in
performFrontend before any swift code runs.
rdar://129528115
(cherry picked from commit 8a824d70a02d6a8e3a37f9d917efb5f5c8beccdf)