Adjusted JGit checkout to match CliGit.

Now if the checkout ref is a simple branch name, and no local branch
exists and there is exactly ONE remote branch with that name, a new
local branch is created and checked out, tracking that remote branch.
(Re-)activated 'shared' clones.

Shared now works as a special case of references.