[Serialization] Avoid to call getTargetSpecificModuleTriple() twice
[Serialization] Avoid to call getTargetSpecificModuleTriple() twice

Maintain an invariant that forEachTargetModuleBasename() iterates names
from most to least desiable.

glessard/swift,nathawes/swift,sschiau/swift,tkremenek/swift,CodaFi/swift,jckarter/swift,shahmishal/swift,benlangmuir/swift,shahmishal/swift,gregomni/swift,jmgc/swift,xwu/swift,aschwaighofer/swift,devincoughlin/swift,CodaFi/swift,sschiau/swift,JGiola/swift,stephentyrone/swift,stephentyrone/swift,atrick/swift,xedin/swift,stephentyrone/swift,parkera/swift,benlangmuir/swift,ahoppen/swift,atrick/swift,aschwaighofer/swift,CodaFi/swift,shajrawi/swift,gribozavr/swift,atrick/swift,xwu/swift,shahmishal/swift,airspeedswift/swift,rudkx/swift,nathawes/swift,gribozavr/swift,shajrawi/swift,xedin/swift,karwa/swift,sschiau/swift,parkera/swift,lorentey/swift,tkremenek/swift,glessard/swift,CodaFi/swift,roambotics/swift,jmgc/swift,rudkx/swift,jckarter/swift,benlangmuir/swift,jmgc/swift,lorentey/swift,lorentey/swift,lorentey/swift,allevato/swift,xedin/swift,rudkx/swift,airspeedswift/swift,JGiola/swift,stephentyrone/swift,shajrawi/swift,roambotics/swift,harlanhaskins/swift,shajrawi/swift,shahmishal/swift,apple/swift,sschiau/swift,jmgc/swift,jmgc/swift,shajrawi/swift,harlanhaskins/swift,karwa/swift,xedin/swift,jckarter/swift,CodaFi/swift,JGiola/swift,ahoppen/swift,benlangmuir/swift,roambotics/swift,glessard/swift,nathawes/swift,ahoppen/swift,glessard/swift,tkremenek/swift,stephentyrone/swift,parkera/swift,karwa/swift,parkera/swift,apple/swift,allevato/swift,airspeedswift/swift,sschiau/swift,apple/swift,jckarter/swift,hooman/swift,nathawes/swift,gregomni/swift,xwu/swift,gregomni/swift,xwu/swift,stephentyrone/swift,hooman/swift,parkera/swift,airspeedswift/swift,harlanhaskins/swift,ahoppen/swift,stephentyrone/swift,aschwaighofer/swift,aschwaighofer/swift,shahmishal/swift,xedin/swift,allevato/swift,roambotics/swift,atrick/swift,JGiola/swift,lorentey/swift,devincoughlin/swift,lorentey/swift,CodaFi/swift,jckarter/swift,nathawes/swift,harlanhaskins/swift,jmgc/swift,atrick/swift,sschiau/swift,harlanhaskins/swift,karwa/swift,gribozavr/swift,apple/swift,allevato/swift,harlanhaskins/swift,gribozavr/swift,gregomni/swift,xwu/swift,aschwaighofer/swift,JGiola/swift,xwu/swift,xedin/swift,gribozavr/swift,hooman/swift,shahmishal/swift,allevato/swift,tkremenek/swift,roambotics/swift,devincoughlin/swift,jmgc/swift,benlangmuir/swift,glessard/swift,karwa/swift,xedin/swift,shahmishal/swift,nathawes/swift,ahoppen/swift,CodaFi/swift,gribozavr/swift,allevato/swift,benlangmuir/swift,airspeedswift/swift,hooman/swift,parkera/swift,parkera/swift,hooman/swift,nathawes/swift,xwu/swift,jckarter/swift,gribozavr/swift,apple/swift,devincoughlin/swift,aschwaighofer/swift,apple/swift,devincoughlin/swift,ahoppen/swift,xedin/swift,tkremenek/swift,devincoughlin/swift,gregomni/swift,shajrawi/swift,shajrawi/swift,aschwaighofer/swift,hooman/swift,rudkx/swift,devincoughlin/swift,sschiau/swift,gribozavr/swift,sschiau/swift,harlanhaskins/swift,gregomni/swift,lorentey/swift,glessard/swift,karwa/swift,roambotics/swift,rudkx/swift,devincoughlin/swift,rudkx/swift,lorentey/swift,airspeedswift/swift,airspeedswift/swift,karwa/swift,hooman/swift,jckarter/swift,shahmishal/swift,JGiola/swift,karwa/swift,parkera/swift,tkremenek/swift,tkremenek/swift,shajrawi/swift,allevato/swift,atrick/swift