[FIXED JENKINS-20286] JGit rebuilds on each poll if wildcard in branch name

The JGit implementation of getHeadRev did not process filename wildcards,
while the CliGit implementation did.  That caused JGit polling of remote
repositories (with the JGit form of "git ls-remote") to always report
there were changes if the branch name included a wildcard, even when
there were no changes.