gitindex: respect flag -submodule (#208)
With this change we don't set `RepoCache` if `-submodule=false`;
It turns out that we didn't respect the submodule flag, IE submodules was enabled by default.
This caused issues, e.g. if a repository had an invalid .gitmodules file.
I also wrapped some of the high-level calls that gitindex does to generate better error
messages and speed-up future debugging.