Fix check_headRev assertions to allow for changes on remote repo

The remote repository is cloned to the local mirror and then the local
mirror is used for most operations.  While the local mirror is being
used, the remote repository may be updated and change its head
revision.  That causes the remote getHeadRev test to fail sporadically
depending on whether the local mirror copy matches the remote.

Rather than have those seemingly random failures, the remote
getHeadRev test has been reworked to use a "git ls-remote" command to
query the remote repository.  The results of that query within the
test are used for the assertions in that test.  That reduces the risk
of test failure to the relatively narrow time window within the
specific test.
Merge branch 'master-fix-getHeadRev-test' into master-work

Conflicts:
	src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java