Fix: <rdar://problem/16877510> capturing an unowned let crashes in silgen
Fix: <rdar://problem/16877510> capturing an unowned let crashes in silgen

There were two problems here: emitRValueForDecl wasn't doing a semantic 
conversion to an RValue when loading from let vardecls of reference storage
type, and we were trying to capture the rvalue type (not the storage type)
when forming the capture.



Swift SVN r17854

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