[electrum] implement TxInput.to_coin_dict and TxInput.is_complete
Summary:
Move the serialization to the legacy dict format into TxInput
This opens the way to using TxInput internally in the Transaction class while still being able to convert to the legacy dict where it is really needed (saving coins to JSON)
Add tests related to input completeness (incomplete inputs have a value and a xpub)
Depends on D14459
Test Plan: python test_runner.py
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14461