[electrum] split address format concept from it's config value
Summary:
D19972 made simple_config depend on address.py, which depends on secp256k1 (this could be fixed, but for now it is out of the scope of this diff). We only need the config values for the address format in siple_config.py, so move these magic strings to a class in there.
This fixes a regression: we want the basic scripts that fetch data from electrum servers to work even if libsecp256k1 is not compiled.
The rest of the codebase does not need to know about the magic strings used as config values, so use an enum instead as the parameter to pick the address format. This is more type-safe
Test Plan:
Check the script works without libsecp256k1
contrib/make_clean python scripts/get_merkle_root.py -s electrum.pierre.cash:50002:s
The tests need it:
contrib/make_secp cd ../build cmake .. -GNinja -DBUILD_CHRONIK=1 ninja check-electrum check-electrum-functional
Toggle the address format in the toolbar and in the preferences menu, and check that this setting is persisted accross restarts. Test the address converter.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D20115