[core] Invert dependency list and merge migrations

Merging migration history will make it seem as though desktop/0007
ran first, but it will actually run after beeswax/0008, oozie/0025,
and pig/0001 when these apps are available. During the build process,
sycndb and migrate commands are ran before the apps are installed,
but after desktop is installed. So desktop/0007 will run first there.
Then, after the apps are installed, syncdb and migrate are executed
again. Here, the proper order will be respected.