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