[electrum] estime tx size without serializing
Summary:
This removes some overhead from the transaction size estimation, by removing the need to serialize the transaction to an hexadecimal string.
Fix txinputs so it works also for inputs that don't have a "scriptSig" field (transaction that were not constructed by deserialization, partially signed transactions).
Note that input_script uses the existing "scriptSig" if available, so in this case it does not add much overhead.
Refactor the boilerplate code for checking the txid in tests, and test the tx size as well.
Depends on D14447
Test Plan: python test_runner.py
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14448