[git-j] History is only recorded when checking out branches/refs.

Checking out a file from a branch, instead of changing branches, was
recording history. We now check to make sure we are actually changing
branches in the hook before calling git-j record-jump.

This requires a hook change. Instead of forcing people to modify hooks,
we upgrade now when we detect the older hook.

There's also a warning listed if an unexpected hook is found.