Removing the need for globals and requiring modules the "Node way"

- Started passing in the server object into each endpoint, since they
  have to use it to register routes. A better approach would probably
  be to make a special object they call on to add the routes, but this
  is maybe a bit better than what we're currently doing.
- Only added the requires where they are needed
- Didn't test any endpoint not documented on docs.apis.is