sync-all: infer remotepath from .gitmodules file
sync-all: infer remotepath from .gitmodules file

After this commit, running `sync-all remote set-url` works properly for the
haddock package:

    command: ./sync-all -r git://git.haskell.org remote set-url origin
    before: git://git.haskell.org/packages/haddock.git
    after: git://git.haskell.org/haddock.git

By doing the `remotepath` lookup before the `$is_github_repo` check,
running `sync-all remote set-url` now also works properly for submodule
repos on github:

    command: ./sync-all -r git://github.com/ghc remote set-url origin
    before: git://github.com/ghc/packages/binary
    after: git://github.com/ghc/packages-binary

* Relevant prior commits:
4f4357 "Make `sync-all remote set-url` use normalized `/packages/` urls"
34b072 "Convert haddock into a proper submodule (re #8545)"
974a97 "sync-all: Apply submodule url rewriting also to stuff in util/"

ml9951/ghc,acowley/ghc,gridaphobe/ghc,mcschroeder/ghc,mfine/ghc,shlevy/ghc,GaloisInc/halvm-ghc,AlexanderPankiv/ghc,mfine/ghc,TomMD/ghc,nathyong/microghc-ghc,sgillespie/ghc,ml9951/ghc,christiaanb/ghc,shlevy/ghc,mfine/ghc,wxwxwwxxx/ghc,tibbe/ghc,shlevy/ghc,jstolarek/ghc,lukexi/ghc,fmthoma/ghc,vTurbine/ghc,shlevy/ghc,da-x/ghc,mettekou/ghc,siddhanathan/ghc,mettekou/ghc,sdiehl/ghc,snoyberg/ghc,sgillespie/ghc,nathyong/microghc-ghc,GaloisInc/halvm-ghc,TomMD/ghc,GaloisInc/halvm-ghc,TomMD/ghc,fmthoma/ghc,lukexi/ghc,ezyang/ghc,da-x/ghc,tibbe/ghc,urbanslug/ghc,jstolarek/ghc,shlevy/ghc,forked-upstream-packages-for-ghcjs/ghc,olsner/ghc,anton-dessiatov/ghc,gridaphobe/ghc,vikraman/ghc,mfine/ghc,fmthoma/ghc,TomMD/ghc,sgillespie/ghc,nathyong/microghc-ghc,AlexanderPankiv/ghc,nushio3/ghc,ghc-android/ghc,snoyberg/ghc,ezyang/ghc,spacekitteh/smcghc,christiaanb/ghc,mfine/ghc,vTurbine/ghc,anton-dessiatov/ghc,siddhanathan/ghc,green-haskell/ghc,bitemyapp/ghc,ghc-android/ghc,nushio3/ghc,snoyberg/ghc,sdiehl/ghc,acowley/ghc,AlexanderPankiv/ghc,spacekitteh/smcghc,fmthoma/ghc,shlevy/ghc,ml9951/ghc,oldmanmike/ghc,wxwxwwxxx/ghc,olsner/ghc,sdiehl/ghc,fmthoma/ghc,nathyong/microghc-ghc,lukexi/ghc,wxwxwwxxx/ghc,ml9951/ghc,gcampax/ghc,da-x/ghc,vikraman/ghc,vTurbine/ghc,vTurbine/ghc,TomMD/ghc,tibbe/ghc,mcschroeder/ghc,ghc-android/ghc,vikraman/ghc,acowley/ghc,sgillespie/ghc,olsner/ghc,nushio3/ghc,oldmanmike/ghc,acowley/ghc,frantisekfarka/ghc-dsi,acowley/ghc,vTurbine/ghc,elieux/ghc,elieux/ghc,christiaanb/ghc,nkaretnikov/ghc,forked-upstream-packages-for-ghcjs/ghc,AlexanderPankiv/ghc,forked-upstream-packages-for-ghcjs/ghc,jstolarek/ghc,urbanslug/ghc,ghc-android/ghc,urbanslug/ghc,GaloisInc/halvm-ghc,wxwxwwxxx/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,gcampax/ghc,fmthoma/ghc,tjakway/ghcjvm,oldmanmike/ghc,bitemyapp/ghc,mcschroeder/ghc,ezyang/ghc,holzensp/ghc,urbanslug/ghc,ezyang/ghc,gcampax/ghc,vikraman/ghc,frantisekfarka/ghc-dsi,anton-dessiatov/ghc,ghc-android/ghc,da-x/ghc,sgillespie/ghc,vTurbine/ghc,jstolarek/ghc,gcampax/ghc,nathyong/microghc-ghc,spacekitteh/smcghc,frantisekfarka/ghc-dsi,nkaretnikov/ghc,bitemyapp/ghc,gridaphobe/ghc,vTurbine/ghc,gcampax/ghc,ml9951/ghc,ezyang/ghc,forked-upstream-packages-for-ghcjs/ghc,urbanslug/ghc,sdiehl/ghc,acowley/ghc,elieux/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,bitemyapp/ghc,tjakway/ghcjvm,sdiehl/ghc,green-haskell/ghc,AlexanderPankiv/ghc,green-haskell/ghc,da-x/ghc,spacekitteh/smcghc,ghc-android/ghc,gridaphobe/ghc,elieux/ghc,da-x/ghc,AlexanderPankiv/ghc,tibbe/ghc,AlexanderPankiv/ghc,nathyong/microghc-ghc,wxwxwwxxx/ghc,sdiehl/ghc,holzensp/ghc,wxwxwwxxx/ghc,vikraman/ghc,TomMD/ghc,mettekou/ghc,siddhanathan/ghc,sdiehl/ghc,olsner/ghc,nathyong/microghc-ghc,mettekou/ghc,snoyberg/ghc,green-haskell/ghc,green-haskell/ghc,frantisekfarka/ghc-dsi,frantisekfarka/ghc-dsi,vikraman/ghc,tjakway/ghcjvm,nkaretnikov/ghc,oldmanmike/ghc,forked-upstream-packages-for-ghcjs/ghc,da-x/ghc,siddhanathan/ghc,tjakway/ghcjvm,mcschroeder/ghc,holzensp/ghc,oldmanmike/ghc,mettekou/ghc,GaloisInc/halvm-ghc,jstolarek/ghc,nushio3/ghc,ml9951/ghc,anton-dessiatov/ghc,elieux/ghc,shlevy/ghc,siddhanathan/ghc,ezyang/ghc,mcschroeder/ghc,gridaphobe/ghc,ghc-android/ghc,christiaanb/ghc,lukexi/ghc,nkaretnikov/ghc,mcschroeder/ghc,nkaretnikov/ghc,nushio3/ghc,olsner/ghc,nkaretnikov/ghc,gridaphobe/ghc,christiaanb/ghc,tjakway/ghcjvm,snoyberg/ghc,snoyberg/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,anton-dessiatov/ghc,urbanslug/ghc,siddhanathan/ghc,mfine/ghc,elieux/ghc,GaloisInc/halvm-ghc,holzensp/ghc,holzensp/ghc,nkaretnikov/ghc,gridaphobe/ghc,tjakway/ghcjvm,mettekou/ghc,spacekitteh/smcghc,tibbe/ghc,mfine/ghc,anton-dessiatov/ghc,mcschroeder/ghc,forked-upstream-packages-for-ghcjs/ghc,nushio3/ghc,ml9951/ghc,fmthoma/ghc,christiaanb/ghc,urbanslug/ghc,christiaanb/ghc,oldmanmike/ghc,tjakway/ghcjvm,olsner/ghc,TomMD/ghc,gcampax/ghc,ml9951/ghc,ezyang/ghc,snoyberg/ghc,lukexi/ghc,sgillespie/ghc,vikraman/ghc,nushio3/ghc,mettekou/ghc,oldmanmike/ghc,acowley/ghc,siddhanathan/ghc,gcampax/ghc,olsner/ghc,bitemyapp/ghc