[Serialization] Fix a bug in the serialization of shared functions.
[Serialization] Fix a bug in the serialization of shared functions.

We do not allow external declarations with shared visibility. This commit makes
the serializer translate shared_external linkage to public_external because the
serialized functions will be available at runtime.

rdar://21989088

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