Initialization cleanup

* Move `main.js` out of the viewer folder.
* Make the startup code in `main.js` much simpler.  Move most of the previous logic to `ApplicationViewModel` and parameterize it so that other NM-based apps can leverage it.  The assumption is that NM-based apps will supply their own `main.js`.
* Improve the URL hash handling.  It's now possible to have multiple parameters (for example `http://localhost:3001/#vic&populate-cache=true`).