[Fix JENKINS-25313]  avoid null pointer if repository not defined
[fix JENKINS-20531], catch GitException during fetch, throw AbortException

The AbortException is already thrown from another area of the same
method, so throwing the AbortException is likely no worse than the
existing AbortException which is thrown (instead of GitException).
Add AbortException comment for retry

Attempt to avoid losing the fix for JENKINS-20531 in future
changes. No easy way to create a test which asserts an error is thrown
when fetch() throws an exception, so insert the comment as a weaker
defense against regression.
Merge remote-tracking branch 'upstream/master' into master-rely-on-client-for-JGit