Added support for using regex directly in BranchSpec if spec string
starts with colon.
Example: ":^(?!(origin/prefix)).*" would match any branch except
'origin/prefix*'.
Merge pull request #138 from mzagar/JENKINS-7087_regex_branchspec_support

JENKINS-7087: support for using regex directly in BranchSpec if spec string starts with colon.
test boolean first to avoid unnecessary IO checking git repository for modules
minor code simplification
[FIXED JENKINS-12188] close JGit repository
upgrade git-client
enable test for JENKINS-8342