Fix JGit isBareRepository implementation and add tests

Previous implementation ignored several cases which command line git handles
Fix trailing white space on getMirrorHead definition
Fix compile error
Merge branch 'proto-fix-JGit-isBareRepository' into master-work

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