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
Fix findbugs NPE warning in CliGitAPIImpl
Test prune with pathologically named branches

If a branch is created and pushed to a remote repository (for example,
a branch named "branch1"), then that branch is deleted, and a new
branch is created and pushed which uses the first branch name as a
parent (for example, a branch named "branch1/a"), the fetch will fail
until a "git remote prune origin" has been performed to remove the
originally created remote branch name from the working repository.

Refer to https://issues.jenkins-ci.org/browse/JENKINS-19591 for a more
detailed description.

This is another case where the JGit implementation differs from the
command line git implementation.  The JGit implementation does not
seem to require the "git remote prune origin" command.  I assume it
performs that operation happens implicitly inside JGit.
Add more assertions to the prune test case
Confirm expected exception pruning without a remote
Test deprecated push(RemoteConfig, String) method

The test shows that there is a problem in the JGit revParse
implementation when used with multiple WorkingArea objects within the
same test.  The same problem does not afflict the CliGit
implementation.  The problem is noted with an "instanceof"
conditional, just as a few of the other differences between JGit and
CliGit are noted.
Use getHeadRev as an additional test of head() method

Still unclear what is wrong with the WorkingArea.head() method, since
it uses the same basic revParse mechanism as getHeadRev().
Assert that repo directory is or is not bare as appropriate