Construct database engine after importing config overrides in startup scripts.

If we construct the engine (and configure logging) before parsing command-line
arguments, then we aren't reading from any configuration file you might pass.
The proximate goal here is to serve from the test database dump via
bin/inbox-api -c tests/config-test.json
Update API endpoints for resource lists to include a trailing slash.

Updated endpoints are:
/threads/
/messages/
/contacts/
/tags/
/webhooks/
/files/

The equivalents without trailing-slash will redirect.