rev-parse: add --git-dir-or-file

This returns the .git file instead of of of the resolved .git
dir. This is especially convenient for passing gitdir around when .git
is from a linked checkout. Otherwise you need to set both $GIT_DIR and
$GIT_COMMON_DIR.  --git-dir can't be changed because it has always
returned directories.

To sum up
                  | .git dir | .git file | .git multi-worktree file
------------------+----------+-----------+-------------------------
--git-dir         | $GIT_DIR | $GIT_DIR  | $GIT_COMMON_DIR/repos/xx
--git-common-dir  | <empty>  | <empty>   | $GIT_COMMON_DIR
--git-dir-or-file | $GIT_DIR | $GIT_DIR  | .git file
git-completion.bash: support multi-worktree mode