Rebuild SQLITE_STAT1 table after drop operations.

The SQLITE_STAT1 table has the estimated number of rows for each table and
index, which is used to calculate a query plan for queries.

The problem is that, DROP TABLE and DROP INDEX appear to remove the
corresponding row from the stats table.  This could cause SQLite to choose
inefficient query plans.

This CL will make sure to rebuild the stats table after such operations.

Added a new boolean paramter rebuildSqliteStats to all methods that
exectue DROP TABLE/INDEX.  If it's set, they'll call updateSqliteStats() to
rebuild the contents.

Bug 7426624

Change-Id: I1c373b902856d1a24b6c0c8379899a235ee284c4
2 files changed