test: Remove confusing and broken use of wait_until global
Summary:
This is a partial backport of core#19730
https://github.com/bitcoin/bitcoin/pull/19730/commits/fa330ec2fe5f5ba68a8d43fff0b19584c0b1ff39
The other commit touches only core's CI scripts.
Test Plan: test/functional/test_runner.py wallet_basic
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10110