Clean up Codable synthesis slightly
Clean up Codable synthesis slightly

Following feedback in https://github.com/apple/swift/pull/9758:
* Use a struct type for the result of hasValidCodingKeysEnum
* Use an enum type for the result of
* Skip fetching a canonical type before calling getAnyNominal()
  (getAnyNominal() looks through sugar already)
* No need to cast to IterableDeclContext (or DeclContext, even)

brentdax/swift,jmgc/swift,return/swift,glessard/swift,apple/swift,djwbrown/swift,devincoughlin/swift,benlangmuir/swift,ahoppen/swift,aschwaighofer/swift,amraboelela/swift,gregomni/swift,jmgc/swift,hughbe/swift,felix91gr/swift,shahmishal/swift,amraboelela/swift,amraboelela/swift,parkera/swift,roambotics/swift,nathawes/swift,frootloops/swift,alblue/swift,practicalswift/swift,danielmartin/swift,gribozavr/swift,benlangmuir/swift,gribozavr/swift,glessard/swift,jckarter/swift,lorentey/swift,jtbandes/swift,sschiau/swift,deyton/swift,CodaFi/swift,roambotics/swift,swiftix/swift,tkremenek/swift,danielmartin/swift,JGiola/swift,rudkx/swift,karwa/swift,frootloops/swift,gregomni/swift,airspeedswift/swift,return/swift,natecook1000/swift,parkera/swift,practicalswift/swift,OscarSwanros/swift,xwu/swift,calebd/swift,hooman/swift,deyton/swift,aschwaighofer/swift,tkremenek/swift,aschwaighofer/swift,gregomni/swift,return/swift,tkremenek/swift,ahoppen/swift,swiftix/swift,deyton/swift,glessard/swift,gregomni/swift,benlangmuir/swift,CodaFi/swift,milseman/swift,alblue/swift,jckarter/swift,hughbe/swift,calebd/swift,glessard/swift,uasys/swift,deyton/swift,CodaFi/swift,jopamer/swift,stephentyrone/swift,practicalswift/swift,ahoppen/swift,jckarter/swift,karwa/swift,allevato/swift,brentdax/swift,jmgc/swift,frootloops/swift,sschiau/swift,uasys/swift,milseman/swift,stephentyrone/swift,Jnosh/swift,jopamer/swift,milseman/swift,frootloops/swift,jckarter/swift,djwbrown/swift,Jnosh/swift,swiftix/swift,devincoughlin/swift,return/swift,harlanhaskins/swift,benlangmuir/swift,gribozavr/swift,austinzheng/swift,huonw/swift,CodaFi/swift,alblue/swift,apple/swift,austinzheng/swift,rudkx/swift,felix91gr/swift,parkera/swift,allevato/swift,rudkx/swift,uasys/swift,karwa/swift,natecook1000/swift,jckarter/swift,natecook1000/swift,danielmartin/swift,lorentey/swift,alblue/swift,hooman/swift,hooman/swift,austinzheng/swift,danielmartin/swift,huonw/swift,zisko/swift,xedin/swift,danielmartin/swift,allevato/swift,aschwaighofer/swift,natecook1000/swift,shahmishal/swift,harlanhaskins/swift,danielmartin/swift,shahmishal/swift,ahoppen/swift,airspeedswift/swift,roambotics/swift,huonw/swift,allevato/swift,gregomni/swift,parkera/swift,airspeedswift/swift,zisko/swift,jtbandes/swift,nathawes/swift,xwu/swift,nathawes/swift,return/swift,ahoppen/swift,apple/swift,huonw/swift,airspeedswift/swift,jtbandes/swift,lorentey/swift,OscarSwanros/swift,gribozavr/swift,airspeedswift/swift,amraboelela/swift,felix91gr/swift,aschwaighofer/swift,shajrawi/swift,apple/swift,swiftix/swift,gregomni/swift,xwu/swift,felix91gr/swift,brentdax/swift,jckarter/swift,djwbrown/swift,gribozavr/swift,tkremenek/swift,OscarSwanros/swift,uasys/swift,hughbe/swift,CodaFi/swift,deyton/swift,karwa/swift,sschiau/swift,harlanhaskins/swift,parkera/swift,devincoughlin/swift,apple/swift,tjw/swift,hughbe/swift,gribozavr/swift,tjw/swift,stephentyrone/swift,atrick/swift,OscarSwanros/swift,jopamer/swift,jmgc/swift,airspeedswift/swift,devincoughlin/swift,hughbe/swift,atrick/swift,devincoughlin/swift,practicalswift/swift,karwa/swift,amraboelela/swift,natecook1000/swift,roambotics/swift,xedin/swift,austinzheng/swift,OscarSwanros/swift,austinzheng/swift,tkremenek/swift,shajrawi/swift,calebd/swift,swiftix/swift,CodaFi/swift,huonw/swift,devincoughlin/swift,xwu/swift,shajrawi/swift,Jnosh/swift,shahmishal/swift,apple/swift,xedin/swift,xwu/swift,Jnosh/swift,lorentey/swift,Jnosh/swift,natecook1000/swift,frootloops/swift,hughbe/swift,rudkx/swift,huonw/swift,shahmishal/swift,jmgc/swift,tjw/swift,sschiau/swift,djwbrown/swift,alblue/swift,glessard/swift,allevato/swift,deyton/swift,harlanhaskins/swift,parkera/swift,JGiola/swift,swiftix/swift,airspeedswift/swift,sschiau/swift,huonw/swift,lorentey/swift,shajrawi/swift,lorentey/swift,atrick/swift,milseman/swift,glessard/swift,ahoppen/swift,devincoughlin/swift,return/swift,practicalswift/swift,xwu/swift,karwa/swift,uasys/swift,shahmishal/swift,milseman/swift,tjw/swift,djwbrown/swift,jopamer/swift,Jnosh/swift,swiftix/swift,danielmartin/swift,karwa/swift,roambotics/swift,nathawes/swift,roambotics/swift,djwbrown/swift,gribozavr/swift,jopamer/swift,brentdax/swift,nathawes/swift,felix91gr/swift,allevato/swift,stephentyrone/swift,austinzheng/swift,nathawes/swift,stephentyrone/swift,xedin/swift,jckarter/swift,tkremenek/swift,calebd/swift,benlangmuir/swift,austinzheng/swift,rudkx/swift,shajrawi/swift,frootloops/swift,tjw/swift,practicalswift/swift,djwbrown/swift,stephentyrone/swift,calebd/swift,OscarSwanros/swift,hooman/swift,xedin/swift,rudkx/swift,parkera/swift,shajrawi/swift,uasys/swift,natecook1000/swift,xedin/swift,amraboelela/swift,tkremenek/swift,zisko/swift,harlanhaskins/swift,tjw/swift,lorentey/swift,alblue/swift,amraboelela/swift,brentdax/swift,stephentyrone/swift,milseman/swift,shahmishal/swift,alblue/swift,sschiau/swift,jmgc/swift,frootloops/swift,atrick/swift,gribozavr/swift,Jnosh/swift,deyton/swift,hooman/swift,felix91gr/swift,brentdax/swift,shajrawi/swift,zisko/swift,tjw/swift,sschiau/swift,jmgc/swift,jtbandes/swift,jtbandes/swift,karwa/swift,CodaFi/swift,sschiau/swift,xedin/swift,aschwaighofer/swift,felix91gr/swift,jtbandes/swift,OscarSwanros/swift,hughbe/swift,zisko/swift,zisko/swift,jopamer/swift,zisko/swift,JGiola/swift,aschwaighofer/swift,JGiola/swift,practicalswift/swift,harlanhaskins/swift,xedin/swift,hooman/swift,shajrawi/swift,JGiola/swift,calebd/swift,atrick/swift,brentdax/swift,jopamer/swift,harlanhaskins/swift,xwu/swift,milseman/swift,return/swift,lorentey/swift,allevato/swift,nathawes/swift,atrick/swift,hooman/swift,calebd/swift,parkera/swift,jtbandes/swift,shahmishal/swift,practicalswift/swift,uasys/swift,devincoughlin/swift,benlangmuir/swift,JGiola/swift