[chronik] Electrum: fix a potential deadlock in scripthash_or_address_suscribe
Summary:
Because the returned status is computed after the task is started, there could be a lock issue with the indexer if an event occurs while the status is being computed. This is most likely to occur with a large wallet but can in theory happen for any subscription.
Computing the status before creating the task solves this issue entirely.
Test Plan:
./test/functional/test_runner.py chronik_*
Tested live against a watchonly IFP wallet.
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D18555