[stdlib] Modify intro sort to pivot on median of 3
[stdlib] Modify intro sort to pivot on median of 3

This modifies the _partition function used during sorting to select
the median of the first, middle, and last elements in the range to
be partitioned. Before partitioning begins, those three elements are
sorted, after which the middle element is selected as the pivot. This
change improves performance for sorted or nearly-sorted data.

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