[electrum] make functional tests works for python < 3.10
Summary:
PEP 604 union types were added in Python 3.10, and we still support 3.7.
See https://peps.python.org/pep-0604/
Test Plan:
With pyenv installed and pyenv install 3.7.0:
~/.pyenv/versions/3.7.0/bin/python -m pytest electrum/electrumabc/tests/regtest/
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14276