Harden `isKindOfClass:` check (#35797)
Harden `isKindOfClass:` check (#35797)

* Harden `isKindOfClass:` check

We've seen some Obj-C NSProxy subclass implementations that are broken and will
crash if you send them a standard `isKindOfClass:` message.  This came out because
the casting machinery is now more aggressive about trying different casting options which
means some of these broken objects are being queried in new ways.

This adds an additional check before calling `isKindOfClass:` to verify that
this object is not using the default NSProxy selector routing.  If it is,
we just assume it's not whatever class is being tested for since we cannot
do anything better.

Resolves rdar://73799124

* Fixes from Mike Ash

* Fix build
rudkx/swift,rudkx/swift,roambotics/swift,benlangmuir/swift,roambotics/swift,roambotics/swift,parkera/swift,gregomni/swift,roambotics/swift,atrick/swift,JGiola/swift,glessard/swift,ahoppen/swift,glessard/swift,tkremenek/swift,atrick/swift,parkera/swift,hooman/swift,tkremenek/swift,parkera/swift,tkremenek/swift,ahoppen/swift,gregomni/swift,parkera/swift,atrick/swift,hooman/swift,hooman/swift,tkremenek/swift,JGiola/swift,parkera/swift,ahoppen/swift,apple/swift,parkera/swift,tkremenek/swift,rudkx/swift,glessard/swift,apple/swift,rudkx/swift,hooman/swift,apple/swift,JGiola/swift,JGiola/swift,JGiola/swift,hooman/swift,xwu/swift,JGiola/swift,xwu/swift,apple/swift,gregomni/swift,hooman/swift,ahoppen/swift,parkera/swift,benlangmuir/swift,xwu/swift,roambotics/swift,glessard/swift,roambotics/swift,xwu/swift,ahoppen/swift,ahoppen/swift,tkremenek/swift,tkremenek/swift,hooman/swift,apple/swift,benlangmuir/swift,benlangmuir/swift,atrick/swift,gregomni/swift,gregomni/swift,benlangmuir/swift,parkera/swift,glessard/swift,rudkx/swift,apple/swift,xwu/swift,glessard/swift,atrick/swift,rudkx/swift,xwu/swift,benlangmuir/swift,gregomni/swift,atrick/swift,xwu/swift