Added test for getHeadRev for branches with namespace
Fix for getHeadRev bug when using branch namespaces

JENKINS-20767
Apply PR feedback: Style, imports + missing fix for JGitAPIImpl
Switched back to "jenkinsci" to be on safe side

The tests will fail now until the required branches are
available in jenkinsci! For local tests you can switch
"jenkinsci" to "alexanderlink".

You have to decide how to handle tests!
Currently the productive repo is cloned for testing...
Changed test branches from "test/..." to "tests/..."

+ small refactoring
Create namespace test branches if they don't exist
Small fix for Marks test improvement + refactoring
Extracted redundant "branch spec to branch name" code
Checking for refs/heads/ in branchSpec

https://github.com/jenkinsci/git-client-plugin/pull/120/files#r10310025
comment of "dnozay"
Merge pull request #120 from alexanderlink/test/namespace3/master

Fix proposal for getHeadRev bug when using branch namespaces