rewrite module loader to use instances

- properly load config and clone it in unit tests so config changes don't persist across tests
- fix broken unit tests that weren't calling `done()`