Reorganize lib to use requirejs
Move Mixins to Nexus namespace
Fix singleton creation
Fix mixin namespace
Fix UI loading: Add nx-all.js, order lib/nx/UI loading

Because we use requirejs modules that install stuff into global
namespace (... NX.define ...) and use those things *outside of
an r.js module* (... NX.define defines r.js modules ...) we have
to "layer" our js loading:

1. sonatype-lib.js is mandatory, contains require.js and string utils
2. nx-all.js contains the definitions needed to load the actual
   application code (NX.define et.al.)
3. sonatype-all.js contains the UI app, uses NX namespace
Add r.js support for plugins
Introduce builder for r.js contrib
Revert changes to singletons creation
Renaming
Generate syntactically correct javascript