Backport various improvement to test_framework.py
Summary:
Backport several PRs and commits, plus fix a few nits.
PR #10318: [tests] fix wait_for_inv()
3e3c22f [tests] fix wait_for_inv() (John Newbery)
PR #10124: [test] Suppress test logging spam
45ce471 Reduce spammy test logging (John Newbery)
Commit a7820422e (Part of PR #11319)
qa: Treat mininode p2p exceptions as fatal (Suhas Daftuar)
Test Plan:
./test/functional/test_runner.py
Reviewers: #bitcoin_abc, schancel
Reviewed By: #bitcoin_abc, schancel
Subscribers: schancel, danconnolly, teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1178