vcs/git: Resolve relative symlinks
Created by: keegancsmith
A relative symlink needs to be resolved from the directory the symlink is in. Previously we would not do this, which would lead to a git error message like "../{rest of symlink path} is outside repository".
This PR also contains some refactorings to the test, which can be reviewed commit by commit.
Fixes https://github.com/sourcegraph/sourcegraph/issues/6034