[ecashaddrjs] Add function to get outputScript from address
Summary: This function is used in both alias-server and ecash-herald. Should be in the address library.
Test Plan: npm test
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13883