Fix CliGitAPIImpl.getHeadRev bug - returned same SHA1 for all refs

The getHeadRev(url) implementation in CliGitAPIImpl returned the same
SHA1 for all refs, even though the refs had different SHA1 values in
the output.
Merge remote-tracking branch 'origin/master-fix-CliGit-getHeadRev' into master-work

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