Refactored endpoint logic to prepare for unit tests.

Renamed files in api folder to end with -routes.js (clearer).
Moved the route definitions into the topic-routes and resource-routes.
Inject services and express app into route modules.
Remove renamed files
Unit tests for topic-routes.

Found that id parameters were being passed to the service as strings.
parseInt whenever a number is passed in as a query param.
Added unit tests around resource routes.

Also, renamed the tests to end with -test.js, to be consistent.
Tests for authentication-routes.

The /login and /logout routes are not covered at the moment.
Need to figure out how to invoke passport when running under supertest.