core.Model objects can now be written back out as .nlogo files

and TestCompileAll now tests this capability by round-tripping
every .nlogo file it compiles

closes #598 (with a single squashed commit)