[ecash-lib] Add UnsignedTx and UnsignedTxInput
Summary:
This allows building the sighash preimages required for signing inputs.
We use UnsignedTx to precompute the hashes required for building the preimages, in case we need to sign a lot of inputs.
Only BIP143 sighash preimages are implemented, but not LEGACY; they aren't available on eCash since UAHF. Implementing it might be useful if we want to allow people to use ecash-lib on Dogecoin.
Test Plan: npm run test && npm run build
Reviewers: bytesofman, #bitcoin_abc
Reviewed By: bytesofman, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D15956