Enhanced unit tests for code generators to compile the generated code, l...

...oad, instantiate, execute, and re-generate from compiled result.

Fixed a few issues discovered while running the enhanced tests.
It might be better to compare the `migration` and `compiledMigration` objects. If any information is lost during code generation, it will not be caught by these tests.