Allow invocation of a DynamicSelf-returning method on an existential.
Allow invocation of a DynamicSelf-returning method on an existential.

As part of this, rewrite the check to use interface types. It's
cleaner and more efficient.

Swift SVN r13353

benlangmuir/swift,Ivacker/swift,OscarSwanros/swift,alblue/swift,tjw/swift,JGiola/swift,lorentey/swift,modocache/swift,jtbandes/swift,bitjammer/swift,tardieu/swift,dduan/swift,rudkx/swift,xwu/swift,ahoppen/swift,frootloops/swift,JaSpa/swift,djwbrown/swift,djwbrown/swift,CodaFi/swift,uasys/swift,swiftix/swift,arvedviehweger/swift,tjw/swift,uasys/swift,JaSpa/swift,ken0nek/swift,huonw/swift,OscarSwanros/swift,return/swift,xwu/swift,tkremenek/swift,amraboelela/swift,parkera/swift,austinzheng/swift,khizkhiz/swift,amraboelela/swift,kperryua/swift,airspeedswift/swift,gottesmm/swift,JGiola/swift,jckarter/swift,return/swift,therealbnut/swift,kstaring/swift,modocache/swift,uasys/swift,shajrawi/swift,johnno1962d/swift,danielmartin/swift,brentdax/swift,shajrawi/swift,sschiau/swift,airspeedswift/swift,devincoughlin/swift,LeoShimonaka/swift,karwa/swift,therealbnut/swift,ken0nek/swift,karwa/swift,zisko/swift,lorentey/swift,jmgc/swift,gribozavr/swift,dduan/swift,tkremenek/swift,jckarter/swift,zisko/swift,hughbe/swift,OscarSwanros/swift,jmgc/swift,airspeedswift/swift,hooman/swift,cbrentharris/swift,lorentey/swift,MukeshKumarS/Swift,Ivacker/swift,LeoShimonaka/swift,codestergit/swift,gmilos/swift,khizkhiz/swift,JaSpa/swift,xwu/swift,khizkhiz/swift,roambotics/swift,xedin/swift,harlanhaskins/swift,glessard/swift,parkera/swift,codestergit/swift,tardieu/swift,ben-ng/swift,adrfer/swift,sdulal/swift,xedin/swift,roambotics/swift,swiftix/swift.old,nathawes/swift,gribozavr/swift,kperryua/swift,amraboelela/swift,jmgc/swift,frootloops/swift,IngmarStein/swift,lorentey/swift,airspeedswift/swift,sschiau/swift,sschiau/swift,xedin/swift,ken0nek/swift,glessard/swift,kperryua/swift,sdulal/swift,jckarter/swift,atrick/swift,felix91gr/swift,shahmishal/swift,OscarSwanros/swift,djwbrown/swift,tinysun212/swift-windows,swiftix/swift.old,nathawes/swift,CodaFi/swift,devincoughlin/swift,rudkx/swift,manavgabhawala/swift,SwiftAndroid/swift,manavgabhawala/swift,shahmishal/swift,jtbandes/swift,modocache/swift,kstaring/swift,mightydeveloper/swift,harlanhaskins/swift,adrfer/swift,CodaFi/swift,deyton/swift,kperryua/swift,SwiftAndroid/swift,slavapestov/swift,KrishMunot/swift,russbishop/swift,jopamer/swift,stephentyrone/swift,tinysun212/swift-windows,arvedviehweger/swift,dduan/swift,kstaring/swift,sdulal/swift,cbrentharris/swift,CodaFi/swift,LeoShimonaka/swift,kusl/swift,kstaring/swift,danielmartin/swift,bitjammer/swift,shajrawi/swift,Ivacker/swift,jckarter/swift,OscarSwanros/swift,stephentyrone/swift,milseman/swift,Ivacker/swift,shahmishal/swift,adrfer/swift,uasys/swift,mightydeveloper/swift,emilstahl/swift,karwa/swift,stephentyrone/swift,swiftix/swift.old,gregomni/swift,LeoShimonaka/swift,tjw/swift,gribozavr/swift,manavgabhawala/swift,sschiau/swift,adrfer/swift,emilstahl/swift,gmilos/swift,codestergit/swift,xwu/swift,gmilos/swift,aschwaighofer/swift,parkera/swift,slavapestov/swift,MukeshKumarS/Swift,mightydeveloper/swift,JaSpa/swift,calebd/swift,bitjammer/swift,deyton/swift,shajrawi/swift,mightydeveloper/swift,sdulal/swift,huonw/swift,danielmartin/swift,jtbandes/swift,gmilos/swift,ahoppen/swift,felix91gr/swift,karwa/swift,parkera/swift,jtbandes/swift,practicalswift/swift,swiftix/swift,hooman/swift,sdulal/swift,hughbe/swift,mightydeveloper/swift,aschwaighofer/swift,allevato/swift,Ivacker/swift,slavapestov/swift,lorentey/swift,Ivacker/swift,LeoShimonaka/swift,milseman/swift,brentdax/swift,harlanhaskins/swift,jmgc/swift,gmilos/swift,aschwaighofer/swift,kentya6/swift,austinzheng/swift,arvedviehweger/swift,natecook1000/swift,calebd/swift,ben-ng/swift,aschwaighofer/swift,ben-ng/swift,devincoughlin/swift,therealbnut/swift,natecook1000/swift,jckarter/swift,MukeshKumarS/Swift,felix91gr/swift,johnno1962d/swift,return/swift,adrfer/swift,milseman/swift,austinzheng/swift,johnno1962d/swift,tardieu/swift,felix91gr/swift,hughbe/swift,ahoppen/swift,deyton/swift,alblue/swift,hooman/swift,apple/swift,benlangmuir/swift,emilstahl/swift,therealbnut/swift,devincoughlin/swift,roambotics/swift,apple/swift,kusl/swift,JaSpa/swift,hooman/swift,amraboelela/swift,practicalswift/swift,nathawes/swift,adrfer/swift,Ivacker/swift,CodaFi/swift,tkremenek/swift,IngmarStein/swift,cbrentharris/swift,xwu/swift,tjw/swift,gregomni/swift,calebd/swift,uasys/swift,gregomni/swift,modocache/swift,Jnosh/swift,felix91gr/swift,tardieu/swift,huonw/swift,CodaFi/swift,Jnosh/swift,codestergit/swift,austinzheng/swift,sdulal/swift,brentdax/swift,KrishMunot/swift,apple/swift,swiftix/swift.old,SwiftAndroid/swift,russbishop/swift,deyton/swift,brentdax/swift,sschiau/swift,djwbrown/swift,frootloops/swift,deyton/swift,calebd/swift,practicalswift/swift,harlanhaskins/swift,gmilos/swift,manavgabhawala/swift,frootloops/swift,alblue/swift,huonw/swift,tardieu/swift,return/swift,russbishop/swift,shahmishal/swift,ahoppen/swift,swiftix/swift.old,hughbe/swift,devincoughlin/swift,ken0nek/swift,kstaring/swift,devincoughlin/swift,russbishop/swift,gottesmm/swift,danielmartin/swift,slavapestov/swift,ben-ng/swift,stephentyrone/swift,tinysun212/swift-windows,airspeedswift/swift,SwiftAndroid/swift,return/swift,kentya6/swift,natecook1000/swift,hooman/swift,cbrentharris/swift,tkremenek/swift,hooman/swift,jckarter/swift,shahmishal/swift,SwiftAndroid/swift,slavapestov/swift,jopamer/swift,gribozavr/swift,jmgc/swift,CodaFi/swift,devincoughlin/swift,MukeshKumarS/Swift,sschiau/swift,xedin/swift,russbishop/swift,brentdax/swift,modocache/swift,brentdax/swift,rudkx/swift,kusl/swift,atrick/swift,aschwaighofer/swift,KrishMunot/swift,felix91gr/swift,harlanhaskins/swift,atrick/swift,practicalswift/swift,JGiola/swift,shajrawi/swift,karwa/swift,IngmarStein/swift,lorentey/swift,calebd/swift,dduan/swift,tardieu/swift,kperryua/swift,apple/swift,johnno1962d/swift,stephentyrone/swift,uasys/swift,cbrentharris/swift,parkera/swift,kstaring/swift,Jnosh/swift,allevato/swift,jtbandes/swift,apple/swift,milseman/swift,sdulal/swift,gottesmm/swift,danielmartin/swift,practicalswift/swift,johnno1962d/swift,shajrawi/swift,glessard/swift,JGiola/swift,stephentyrone/swift,atrick/swift,arvedviehweger/swift,lorentey/swift,IngmarStein/swift,tinysun212/swift-windows,jopamer/swift,jtbandes/swift,jckarter/swift,glessard/swift,allevato/swift,tjw/swift,hooman/swift,milseman/swift,Jnosh/swift,parkera/swift,therealbnut/swift,benlangmuir/swift,ken0nek/swift,benlangmuir/swift,practicalswift/swift,kentya6/swift,frootloops/swift,IngmarStein/swift,glessard/swift,swiftix/swift,gregomni/swift,IngmarStein/swift,russbishop/swift,shajrawi/swift,MukeshKumarS/Swift,practicalswift/swift,SwiftAndroid/swift,kentya6/swift,ken0nek/swift,parkera/swift,natecook1000/swift,airspeedswift/swift,gottesmm/swift,austinzheng/swift,zisko/swift,swiftix/swift,amraboelela/swift,khizkhiz/swift,xedin/swift,xwu/swift,brentdax/swift,djwbrown/swift,khizkhiz/swift,Jnosh/swift,gribozavr/swift,roambotics/swift,johnno1962d/swift,ken0nek/swift,kentya6/swift,natecook1000/swift,gottesmm/swift,swiftix/swift.old,russbishop/swift,frootloops/swift,alblue/swift,aschwaighofer/swift,calebd/swift,natecook1000/swift,emilstahl/swift,felix91gr/swift,therealbnut/swift,nathawes/swift,Jnosh/swift,gribozavr/swift,ahoppen/swift,manavgabhawala/swift,austinzheng/swift,gottesmm/swift,khizkhiz/swift,tkremenek/swift,xedin/swift,hughbe/swift,danielmartin/swift,parkera/swift,huonw/swift,swiftix/swift.old,jopamer/swift,kstaring/swift,JGiola/swift,JaSpa/swift,amraboelela/swift,swiftix/swift.old,codestergit/swift,mightydeveloper/swift,xwu/swift,cbrentharris/swift,atrick/swift,gregomni/swift,OscarSwanros/swift,return/swift,deyton/swift,sdulal/swift,benlangmuir/swift,jtbandes/swift,dreamsxin/swift,kusl/swift,ben-ng/swift,johnno1962d/swift,sschiau/swift,djwbrown/swift,IngmarStein/swift,apple/swift,modocache/swift,alblue/swift,roambotics/swift,Jnosh/swift,mightydeveloper/swift,emilstahl/swift,tardieu/swift,kperryua/swift,LeoShimonaka/swift,MukeshKumarS/Swift,manavgabhawala/swift,sschiau/swift,ahoppen/swift,djwbrown/swift,KrishMunot/swift,kusl/swift,lorentey/swift,MukeshKumarS/Swift,allevato/swift,ben-ng/swift,tjw/swift,rudkx/swift,frootloops/swift,arvedviehweger/swift,mightydeveloper/swift,huonw/swift,calebd/swift,gregomni/swift,tkremenek/swift,harlanhaskins/swift,aschwaighofer/swift,harlanhaskins/swift,JaSpa/swift,dduan/swift,swiftix/swift,danielmartin/swift,swiftix/swift,allevato/swift,nathawes/swift,uasys/swift,bitjammer/swift,amraboelela/swift,shajrawi/swift,shahmishal/swift,atrick/swift,tinysun212/swift-windows,tjw/swift,rudkx/swift,bitjammer/swift,zisko/swift,slavapestov/swift,jmgc/swift,therealbnut/swift,milseman/swift,xedin/swift,jopamer/swift,adrfer/swift,codestergit/swift,slavapestov/swift,OscarSwanros/swift,gribozavr/swift,emilstahl/swift,SwiftAndroid/swift,kentya6/swift,dduan/swift,benlangmuir/swift,practicalswift/swift,xedin/swift,swiftix/swift,alblue/swift,KrishMunot/swift,kusl/swift,zisko/swift,allevato/swift,tinysun212/swift-windows,huonw/swift,roambotics/swift,jopamer/swift,emilstahl/swift,karwa/swift,zisko/swift,Ivacker/swift,hughbe/swift,dduan/swift,karwa/swift,tkremenek/swift,stephentyrone/swift,kusl/swift,gribozavr/swift,ben-ng/swift,tinysun212/swift-windows,alblue/swift,LeoShimonaka/swift,allevato/swift,KrishMunot/swift,nathawes/swift,manavgabhawala/swift,emilstahl/swift,modocache/swift,kentya6/swift,karwa/swift,airspeedswift/swift,hughbe/swift,arvedviehweger/swift,nathawes/swift,kentya6/swift,kusl/swift,gmilos/swift,KrishMunot/swift,return/swift,cbrentharris/swift,bitjammer/swift,JGiola/swift,rudkx/swift,gottesmm/swift,deyton/swift,glessard/swift,khizkhiz/swift,devincoughlin/swift,jopamer/swift,cbrentharris/swift,milseman/swift,arvedviehweger/swift,shahmishal/swift,dreamsxin/swift,austinzheng/swift,shahmishal/swift,kperryua/swift,jmgc/swift,zisko/swift,LeoShimonaka/swift,natecook1000/swift,bitjammer/swift,codestergit/swift