Clean up the module initialisation stuff a bit, and add support for module initialisation blocks in the native code generator.