Fix one source of exponential behavior in the type checker.
Fix one source of exponential behavior in the type checker.

For collection literals that contained implicitly unwrapped optionals,
we were attempting three different conversions per element of the
collection, resulting in exponential type checking time.

We should only ever attempt one of these conversions for any pair of
types where one or both is optional.

We had several reports of this as it seems quite common for people to
write expressions that create a collection of IUOs from class/struct
elements, and then either return the collection or some variation that
has been filtered and mapped.

I am looking at adding the appropriate instrumentation to the type
checker so that I can add a scale-test for this and other type checker
test cases related to slow type checking so that we can avoid regressing
in the future.

(cherry picked from commit 1efafbcd9b6bb13a24f509985b3d0a879cfb8ca2)

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