[alias-server] Improve code organization, generate mocks from script
Summary:
T2960
Was going to patch some other bugs but needed to organize the code first and clean up index.js. Move util functions out of index.js and into new script in new scripts folder. Call with new npm script.
Test Plan:
npm run mocks and observe mocks generated in test/mocks/generated folder
clear database and node index.js, add a new alias using cashtab, confirm it's added to the db
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D13246