[alias-server] [p6] outputScriptToAddress function and unit tests
Summary:
T2922
Depends on D13078
Add a function to get P2SH or P2PKH ecash: address from an outputScript. Add unit tests.
The next diff in this stack will implement this function in getAliases and add unit tests there.
Test Plan:
Review function and unit tests
npm test
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D13079