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

...ame

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.

There are still observable differences in the implementations in corner cases,
since the filename pattern matching implemented in the CliGit C code is only
approximated by a mapping of the * and ? characters to a 0..n character 
match and a 1 character match respectively.  If the user provides a branch
name which uses other regular expression constructs (like \b, or \d), the
JGit