Fix submodule accounting for name and path changes

Wrote tests that try adding, removing, and updating the name of
submodules which showed a number of problems with how we account
for changes when incrementally updating the submodule info.  Most
of these issues didn't exist before because reloading would always
blow away the old submodule data.