[electrum] fix and add tyephints in base58 decoding code
Summary:
The return type in serialize_privkey was wrong, it is a Base58 (WIF) encoded string, not bytes.
Also base_decode may return None if the result does not fit in the expected length, and DecodeBase58Check needs to bail out early when this happens instead of trying to slice None.
Test Plan:
python test_runner.py
Check that these particular errors are now fixed wrt to mypy:
mypy --ignore-missing-imports | grep "^electrumabc/bitcoin.py
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14807