Teach module lookup to look first in the directory where the importing module is located, and then fall back to the current directory if nothing was found there. This allows us to run the Swift regression tests from a directory other than "test" (e.g., in the build directory, as is currently needed by CMake).
Teach module lookup to look first in the directory where the importing
module is located, and then fall back to the current directory if
nothing was found there. This allows us to run the Swift regression
tests from a directory other than "test" (e.g., in the build
directory, as is currently needed by CMake).

The implementation itself is a temporary hack that will eventually
need to be replaced with a proper virtual file system + module
manager.


Swift SVN r405

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