ensure calling order on loaded modules

- IModule changed to contain module destructor
- Instance methods on modules are now guaranteed to be called in loading
  order