Mvdb/516/generate migration chain

to test:

    $ make test TESTS=test_state.TestState.test_remote_diff VERBOSITY=DEBUG
    $ make test TESTS=test_migration.TestMigration.test_engine VERBOSITY=DEBUG