Moved the migration.js to the model folder.

Ported functionality to complete migrations as is currently supported with local tracking of what scripts have been executed.
Moved the set.js to lib/model/set.js