api and pages server stabilized

- adds domain middleware
- cluster launches and restarts workers whenever a server error occurs
- both api and pages separately require events
- better separation of api and pages
- adding apiHost param to allow hosting on a different machine
- forking api master when both pages and api server run on same machine
documentation, jsdoc and bin updates