Module Manager refactor

Added extra check to the dependencies of modules
diff:
`currentModule.instance.setModuleManager(self);`
```
currentModule.instance.setModuleManager(
          utils.__DEV__ ?
            // use proxy only in dev
            new ModuleManagerProxy(self, currentModule)
            : self
        );
```