Add basic primitives for building Bitcoin txs:
- Tx, TxInput, TxOutput, OutPoint, the basic primitives comprising a tx.
- Script, currently just a wrapper around Uint8Array of the bytecode, but in the future gives a rich builder for Scripts.
- SignData: Attached to a TxInput (ignored during serialization), used when signing the input using BIP143.
Unlike the previous draft, this version uses a Writer interface to unify object size calculation and object serialization, significantly simplifying the implementation.
Also, the writer interface abstracts over the messiness of Uint8Array and DataView handling, especially keeping track of the current write/read offset within the data.