swift: modernise some types (NFC)
swift: modernise some types (NFC)

Update the implementation to address the deprecation warnings from the
newer swift compiler.  This is meant to be an equivalent update (NFCI).

apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch