GitRepository refactoring

This cleans the git code a little bit and puts things into better places.
* move some methods from `Repository` to `GitRepository` that actually belong there
* use more delegates
* use less `@repo`
* rename variable `url` to `path`
Metrics/MethodLength: Method has too many lines. [15/10]<br>Metrics/PerceivedComplexity: Perceived complexity for commit_id is too high. [8/7]