[alias-server] Refactor to support unit testing of API endpoints
Summary:
T3060
Refactor to support unit testing of API endpoints.
Following express documentation and mochajs example at https://github.com/mochajs/mocha-examples/tree/master/packages/express-rest-api
Remove the express app from main.js. Refactor index.js so that the app initializes the db first before passing this to the express server and the indexer.
Add unit test for existing API endpoint.
Test Plan: npm test
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14113