Avoid unnecessary calls to CodeCompletionString::getName during sorting
Avoid unnecessary calls to CodeCompletionString::getName during sorting

This improves run time of this particular function by up to 8x in my
testing. For *really* large sets of code completions (I tested top-level
completion with Cocoa imported) this gives a 30-40% improvement across
the request, not including time spent in the client.  The tradeoff is a
slight increase in peak memory usage (I saw 0.7% or 1.2 MB for the
top-level Cocoa case).

<rdar://problem/20355626>

Swift SVN r26748

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