[FixRM #7673] "Failed to reload" error.

When db_disconnect is issued, this funtion does not update the status
of self.migrated to false.  So when another reload command is used,
the update_module_details function will still try to connect to the
database, which causes the "Failed to reload" error.
Reset modules_cached flag when database disconnects
Merge remote-tracking branch 'wchen-r7/fail_to_reload_fix'