cache: handle git-submodules in git-dependencies

Fix #1876

this is another approach besides #3343

here i replace `git archive -> addLocalTarball()` with `git checkout && git submodule update --init --recursive -> addLocalDirectory()`. `_git-remotes` is not bare anymore so we can update git-submodules in it and dont need to clone into a tmp-directory.

```
1. cacheDir = path.join(cache,'_git-remotes',sha1(u))
2. checkGitDir(cacheDir) ? 4. : 3. (rm cacheDir if necessary)
3. git clone u cacheDir
4. git fetch -a origin (cwd: cacheDir)
5. git checkout <git-ref> (cwd: cacheDir)
6. git submodule update --init --recursive (cwd: cacheDir)
7. addLocalDirectory(cacheDir)
```