Previously, we had hacks in place to eagerly emit everything in
the global ExternalDefinitions list. These can now be removed,
at least at the IRGen layer.
IRGen emits lazily-emitted definitions after emitting Clang declarations.
So an internal function that references an Objective-C class global and
is itself referenced from after a public function can observe
a OBJC_CLASS_$_ global defined by Clang.
Use a similar strategy as the Clang patch, just bitcast the global if it
exists already.
Fixes <rdar://problem/23200656>.
Swift SVN r32845