[git/working_dir] (GH-137) Update remotes and alternates

Commit 3b9b3926 introduced a regression where the actual git remotes
were not inspected and the remote would always behave like it was in
sync. This meant that when a git module was switched from one remote to
another that change would not persist to the system. In addition the git
object alternates was not updated with the new cache, so the new repo
could start accumulating git objects unnecessarily.

This commit updates the working dir to inspect the git remotes for
'origin' and 'cache' to make sure they are set to the expected values,
and will update them as necessary when they are not properly set. Since
changing the origin remote means the cache is also updated the remotes
are always updated in pairs.