Fix some bogus bridging casts that were allowed in Swift 3.
Fix some bogus bridging casts that were allowed in Swift 3.

Swift 3 unintentionally allowed collection casts from, e.g.,
Set<AnyHashable> to Set<NSObject>, when in fact the object
representation of the AnyHashable might not be an NSObject. Fix up our
tests and overlays that ran afoul of this rule.

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