SR-11917: Using JSONEncoder's .outputFormatting = .sortedKeys has a memory leak on Linux
SR-11917: Using JSONEncoder's .outputFormatting = .sortedKeys has a memory leak on Linux

- Any use of NSString.compare(_:options:range:locale:) with a non-nil locale
  would leak on Linux.

- _CFCompareStringsWithLocale was leaking the collator on non-macOS
  platforms.

- Use the collator cache on Linux and Win32 the same way that macOS
  does.

apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation