[electrum] add a TxInput class
Summary:
The end goal is to replace the clumsy "coin" dictionary full of hex strings by this more lightweight object.
An intermediate goal is to use its size() method to compute/estimate transaction sizes without having to construct and serialize the tx.
This will likely yield a performance improvement for some operation and allow the coinchooser to not produce transactions that can't be relayed due to the maximum 100 kB size policy.
The __eq__ methods in OutPoint and TxInput are used for testing equality between two instances.
The __str__ methods are implemented for convenience/debugging, as they make assertEqual produce a more helpful log in case a test fails.
Depends on D14433
Test Plan: python test_runner.py
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien, bytesofman
Differential Revision: https://reviews.bitcoinabc.org/D14434