ui: Refactor main to be class-based, add getMain() global utility
When ESM (ECMAScript Modules) land, it will no longer be possible to treat `imports.ui.main` as an object where properties (exports) can be re-assigned. To handle this change, `imports.ui.main` is refactored into a `Main` class which is the instantiated as a singleton in `main.js`. `main.js` uses a proxy to allow for circular references, this emulates how ES module imports are "live" and can be updated. ECMAScript Modules are entirely asynchronous so to ensure `main`/`GnomeShell` can be conditionally accessed synchronously outside of the imports system (e.g. in looking glass, extension utilities, etc.), add global.getMain() to retrieve the "main" object in these contexts.