test: Fix feature_init intermittent issues
Summary:
The test doesn't work currently because the log might be finalized before wait_for_debug_log is started, in which case it will assume the log is empty and fail to detect any line.
Fix this by calling wait_for_debug_log first. Fixes core#24060.
This concludes backport of core#24192
https://github.com/bitcoin/bitcoin/pull/24192/commits/fa7b07571f24b6def6effdd4cc1b96c7507bf959
Depends on D12620
Test Plan: ninja check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12621