Currently, we do not cache the current Swift locale if we cannot fetch proper preferences. This allows us to update the cached value if subsequent access succeeds.
We should be doing that for `currentNSLocale` too, but we are not. Fix the logic so that the behaviors match.
Resolves rdar://142699797
* Use dynamic replacement instead of _typeByName for internationalization upcalls
* Make FOUNDATION_FRAMEWORK function non-dynamic
* Fix build failures
We re-construct a `Locale` everytime `calendar.locale` getter is called with `Locale(identifier:preferences:)`. When `preferences == nil`, this "preference-carried" `Locale` should behave exactly the same as a "fixed" locale.
Since we cache all fixed locale by their identifiers already, we should just return one from the cache instead of creating a brand new one. This allows us to reuse all precomputed values and avoid having to call into ICU repeatedly.
124868926
* Fix a bug where use of autoupdatingCurrentLocale with number formatters resulted in not-autoupdating behavior
* Remove tests for Measurement in package