Add export for node or AMD style modules

- change reference to global object for either browser or server
- a global QM object will only be made available if it is already
  defined
Renamed core file to quartermaster
Rename module loader
Change global QM reference in require module
Move domready in modules src
Use define for domready module
Move loader module in modules src dir
Use define for loader module
Add basic support for use in Node

- generated files now copied into lib
- remove path connotations from QM module names
- add index.js to export core and reactive modules
- use module factory pattern for core and reactive modules
Add tryf to module exports
Add catch to Promise.prototype for use in ES6 browsers
Rename api.promise.takeState to api.promise.adopt