Support submodules in git-new-workdir.

The basic problem with submodules is that instead of having a .git
directory, they have a .git file with contents `gitdir: <some other
path>`.  This is a problem because the submodule's config file has an
entry like `worktree = ../../../khan-exercises` which is relative to
"some other path", rather than to "submodule_dir/.git".

As a result, if we want the new workdir to work properly, it needs to
keep the same directory structure as the original repository: it
should also contain a .git file with a 'gitdir', and the actual .git
contents should respect the value of 'gitdir'.  (There are other ways
we could have solved this problem, including modifying the 'config'
file, but this seemed most in keeping with the symlink-y philosophy of
git-new-branch.)

This commit implements this, by detecting if the source .git directory
is actually a .git file with 'gitdir: ...' as its contents, and if so
reproducing the .git file + gitdir in the destination work-tree.

Test plan:
On a repo (~/khan/webapp) with a submodule, ran

    git new-workdir ~/khan/webapp /tmp/webapp      # the main module
    git new-workdir ~/khan/webapp/khan-exercises /tmp/webapp/khan-exercises

and saw that /tmp/webapp/khan-exercises was populated correctly,
/tmp/webapp/.git/modules/khan-exercises existed with symlinks, and
/tmp/webapp/khan-exercises/.git was a file with a 'gitdir:' entry
pointing to the .git/modules directory.