Make DisconnectGitAlternates more cautious
The way things are headed we are going to run DisconnectGitAlternates a lot, and often, namely on all repos that are not in an object pool, every time they get cleaned up. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28144
I think it would be good to err a little more on the side of caution.
- if the alternates file exists but it is empty, bail out with an error
- if the alternates file contains garbage data that does not resolve to an existing directory, bail out with an error