[electrum] remove uneccessary hex <--> bytes conversions in bitcoin.py
Summary:
These functions all return bytes, so make them work with bytes directly rather than converting integers to strings then converting them to bytes.
It improves code readability and performance.
Depends on D14462
Test Plan:
python test_runner.py
I ensured every single line touched by this diff is covered by tests by introducing errors and making sure it causes failures and errors.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14463