[chronik-client] Make sure we have a listener attached when emitting the ready status event
Summary:
Otherwise wait for a bit and retry in a loop. Mocha will eventually time out if no listener is ever attached. Also do the same for ecash-lib.
This will fix most of the integration test failures.
Test Plan:
npm run integration-tests
Reviewers: #bitcoin_abc, bytesofman
Reviewed By: #bitcoin_abc, bytesofman
Differential Revision: https://reviews.bitcoinabc.org/D16095