#1051 API main class

* Added a main `api.js` module, to which all API controllers can add their Express routes.
* Exposed mongoose instance to allow tests to change connected database.