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`
Lint/AmbiguousRegexpLiteral: Ambiguous regexp literal. Parenthesize the method arguments if it's surely a regexp literal, or add a whitespace to the right of the `/` if it should be a division.