[qa] Fix race condition in example_test.py
Summary:
PR description:
There's a race between sending a getdata for a bunch of blocks with the node receiving those blocks from a peer, which could cause test failure. Fix this.
Motivated by observing this race caused an appveyor test failure on another PR
Backport of Core PR16459
Test Plan: ninja && test/functional/test_runner.py example_test
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7886