cache: handle git-submodules in git-dependencies

Fix #1876

this is another approach besides #3343

```
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)
7. git checkout <git-ref> (cwd: cacheDir)
8. git submodule update --init --recursive (cwd: cacheDir)
9. addLocalDirectory(cacheDir)
```