Improve scanning and normalization abilities for DatabaseState.
Review Request #10556 — Created May 20, 2019 and submitted
DatabaseStatewas originally built to help solve some tracking
problems for table indexes. We now need it to track model installation,
and going forward, we'll be using it to track table engines and other
This change updates this class to fix up some small table lookup issues
(ensuring that we always normalize table names), to rename
rescan_tables()(which is a more appropriate
name), and to add a utility function for determining if the database has
a table that backs a given model.
Future changes will update this to track additional information.
Unit tests pass.