[ecash-lib] Add a bunch of helpers for Script
Summary:
Add helper functions fromOps, ops, cutOutCodesep, isP2sh, p2sh, p2pkh, p2pkhSpend to Script.
Add ScriptOpIter, which is returned by Script.ops to iterate over the Ops of a Script.
Test Plan: npm run test && npm run build
Reviewers: bytesofman, #bitcoin_abc
Reviewed By: bytesofman, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D15952