Squash Icehouse DB Migrations

MySQL: Produces an identical database, with one bug fixed in migration 40.
SQLite: Produces a "better" database, with some lost constraints restored.
PostgreSQL: Produces an identical database, with a bug in migration 39 fixed.

Change-Id: I8c8397ad38cc2d6344aa169c766e3adf18043ee1
Merge "Squash Icehouse DB Migrations"