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 JGit isBareRepository implementation and add tests

Previous implementation ignored several cases which command line git handles
Fix trailing white space on getMirrorHead definition
Merge remote-tracking branch 'wheezy64b/proto-fix-JGit-isBareRepository' into proto-fix-JGit-isBareRepository
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().
Merge remote-tracking branch 'upstream/master' into proto-fix-JGit-isBareRepository
Merge remote-tracking branch 'origin/master-add-deprecated-push-test' into proto-fix-JGit-isBareRepository
Merge remote-tracking branch 'origin/master-add-prune-test-case' into proto-fix-JGit-isBareRepository
Merge remote-tracking branch 'origin/master-fix-findbugs-NPE-one-more' into proto-fix-JGit-isBareRepository
Assert that repo directory is or is not bare as appropriate
Merge remote-tracking branch 'wheezy64b/proto-fix-JGit-isBareRepository' into proto-fix-JGit-isBareRepository