[electrum] move get_preimage_script from Transaction to TxInput
Summary:
And improve support of p2pk inputs: a pubkey can be passed but is not available from a deserialized tx, an address is not applicable. This is required to test get_preimage_script.
So far get_preimage_script had only partial test coverage for p2pkh transaction. Add coverage for p2pk and multisig p2sh.
Drop the special case for transaction type "unknown", because nothing in this codebase uses or defines txin["scriptCode"]
Add a OutPoint.from_str helper which is just used in tests for now, but can be used later for parsing JSON wallet files.
Depends on D14496
Test Plan: python test_runner.py
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14497