Auto migration

Changes to migration api to ensure we are always persisting the correct version. You now set a schema version and migration block and migrations are automatically applied as needed.

Also added apis for adding and deleting objects during a migration.

@tgoyne @jpsim 
These don't need to be static because they're in an anonymous namespace.