Provide helpers to construct localrepos
In order to remove the global variable for the catfile cache, we'll have to make the cache available for the localrepo implementation, too. This requires a change to the constructor, but with the many invocations of localrepo.New()
we have right now it's a huge pain to change anything there.
As a preparatory step, this MR thus introduces a couple of helpers to construct localrepos: one for tests which simply constructs dependencies ad-hoc from the Gitaly config, and then one helper for each service which uses localrepos which takes dependencies from the server struct itself.