rev-parse: change --git-dir behavior with $GIT_ONE_PATH

Normally --git-dir returns a directory where you could access worktree
stuff, even from a linked checkout. In a linked checkout, non-worktree
stuff can be accessed with --git-common-dir. But if you want to pass
the linked checkout's repo view around you need to do

  git --git-dir=foo --git-common-dir=bar blah

instead of the normal

  git --git-dir=foo blah

This could cause lots of changes in current scripts. Now if
$GIT_ONE_PATH is set, rev-parse --git-dir returns a .git file instead
so you can keep doing the same "git --git-dir=foo blah" as before.

An environment variable is introduced instead of a new option to keep
changes in scripts minimum again. If you do

  GIT_ONE_PATH=1 git rev-parse --git-dir

it works with both old and new git versions. Of course if you run that
on a linked checkout using an old version, it'll barf. But at least
"old git + normal checkout" works as before.
git-completion.bash: support multi-worktree mode