Add some defensive checks against invalid serialization (#22466)
Add some defensive checks against invalid serialization (#22466)

If a non-serializable Decl or Type makes it into serialization logic
in a release build, an invalid swiftmodule might be produced silently,
leading to crashes in clients. Try to catch this with an on-in-Release
check that /something/ was serialized. (This is my best guess at how
rdar://problem/47459323 occurred.)
tkremenek/swift,shajrawi/swift,ahoppen/swift,glessard/swift,parkera/swift,CodaFi/swift,lorentey/swift,airspeedswift/swift,shajrawi/swift,parkera/swift,jckarter/swift,JGiola/swift,atrick/swift,airspeedswift/swift,CodaFi/swift,harlanhaskins/swift,CodaFi/swift,xwu/swift,xwu/swift,benlangmuir/swift,gregomni/swift,harlanhaskins/swift,hooman/swift,shahmishal/swift,shajrawi/swift,karwa/swift,jckarter/swift,gregomni/swift,allevato/swift,gribozavr/swift,harlanhaskins/swift,jmgc/swift,parkera/swift,jmgc/swift,lorentey/swift,aschwaighofer/swift,glessard/swift,xwu/swift,sschiau/swift,karwa/swift,nathawes/swift,stephentyrone/swift,devincoughlin/swift,allevato/swift,devincoughlin/swift,xedin/swift,xwu/swift,apple/swift,sschiau/swift,atrick/swift,glessard/swift,tkremenek/swift,rudkx/swift,xwu/swift,harlanhaskins/swift,parkera/swift,hooman/swift,airspeedswift/swift,aschwaighofer/swift,xedin/swift,xedin/swift,airspeedswift/swift,devincoughlin/swift,rudkx/swift,parkera/swift,shahmishal/swift,gribozavr/swift,stephentyrone/swift,ahoppen/swift,xedin/swift,sschiau/swift,gribozavr/swift,xedin/swift,jmgc/swift,karwa/swift,amraboelela/swift,airspeedswift/swift,gribozavr/swift,xwu/swift,jmgc/swift,xedin/swift,shahmishal/swift,apple/swift,karwa/swift,amraboelela/swift,harlanhaskins/swift,hooman/swift,shajrawi/swift,glessard/swift,practicalswift/swift,apple/swift,practicalswift/swift,devincoughlin/swift,shajrawi/swift,jckarter/swift,devincoughlin/swift,tkremenek/swift,stephentyrone/swift,rudkx/swift,xedin/swift,gribozavr/swift,parkera/swift,atrick/swift,practicalswift/swift,gregomni/swift,lorentey/swift,xedin/swift,karwa/swift,benlangmuir/swift,aschwaighofer/swift,aschwaighofer/swift,benlangmuir/swift,harlanhaskins/swift,ahoppen/swift,stephentyrone/swift,amraboelela/swift,devincoughlin/swift,rudkx/swift,aschwaighofer/swift,amraboelela/swift,amraboelela/swift,tkremenek/swift,sschiau/swift,benlangmuir/swift,allevato/swift,gregomni/swift,atrick/swift,lorentey/swift,nathawes/swift,CodaFi/swift,lorentey/swift,ahoppen/swift,tkremenek/swift,lorentey/swift,aschwaighofer/swift,apple/swift,CodaFi/swift,gribozavr/swift,gribozavr/swift,gribozavr/swift,practicalswift/swift,roambotics/swift,ahoppen/swift,shajrawi/swift,JGiola/swift,jckarter/swift,rudkx/swift,airspeedswift/swift,jmgc/swift,glessard/swift,stephentyrone/swift,roambotics/swift,shahmishal/swift,devincoughlin/swift,amraboelela/swift,airspeedswift/swift,JGiola/swift,allevato/swift,allevato/swift,amraboelela/swift,roambotics/swift,devincoughlin/swift,gregomni/swift,ahoppen/swift,CodaFi/swift,practicalswift/swift,shajrawi/swift,karwa/swift,roambotics/swift,nathawes/swift,nathawes/swift,hooman/swift,allevato/swift,karwa/swift,jckarter/swift,sschiau/swift,stephentyrone/swift,tkremenek/swift,practicalswift/swift,JGiola/swift,jmgc/swift,sschiau/swift,shahmishal/swift,xwu/swift,atrick/swift,glessard/swift,nathawes/swift,karwa/swift,aschwaighofer/swift,parkera/swift,tkremenek/swift,allevato/swift,benlangmuir/swift,benlangmuir/swift,roambotics/swift,hooman/swift,shahmishal/swift,harlanhaskins/swift,rudkx/swift,JGiola/swift,hooman/swift,lorentey/swift,hooman/swift,shahmishal/swift,apple/swift,CodaFi/swift,sschiau/swift,jckarter/swift,apple/swift,atrick/swift,practicalswift/swift,lorentey/swift,stephentyrone/swift,nathawes/swift,jmgc/swift,shajrawi/swift,sschiau/swift,shahmishal/swift,practicalswift/swift,roambotics/swift,JGiola/swift,parkera/swift,jckarter/swift,gregomni/swift,nathawes/swift