Make gitfs_base configurable on a per-repo basis

Also fixed a regression, present only in the develop branch, where
ordering of gitfs remotes was not preserved, as well as another
regression introduced yesterday in 3835d30.

Additionally, this commit refactors how the master handles per-repo
configuration parameters. Instead of passing them around, the config
dict for the repo is passed around and the values are referenced from
it. This greatly simplifies the code.

Fixes #11347.