In case of cross-module-optimizations it can happen that a private global variable is changed to public,
but it's declaration is not available in the module file.
It seems really unfortunate that we use SILCloner to, basically,
implement a recursive visitor of the types used in a SIL function,
but apparently it's what we do.
Fixes#72117.
Referenced functions within the initializer of a SILGlobalVariable must be handled like referenced functions in other functions.
Fixes an assert crash when compiling with -cross-module-optimization
The check for implementationOnly imports was already done for types, but it was missing for functions.
Fixes a crash when implementationOnly-importing a C module.
https://bugs.swift.org/browse/SR-15048
rdar://81701218