[electrum] use an IntEnum for script types
Summary:
This simplifies the code and makes it more typesafe.
The plan is to use this enum in the TxInput class and eventually in coin dicts to replace the "p2pkh", "p2sh", "p2pk" and "coinbase" strings (utxo["type"]).
Depends on D14434
Test Plan:
python test_runner.py
I also ran the new test_privkey_from_WIF_privkey before this commit, to check that the behavior didn't change.
Run the application (electrum/electrum-abc), send a transaction to be sure the transaction construction/serialization/deserialization still works.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14436