[tests] Only acquire lock once in p2p_compactblocks.py
[tests] Don't acquire mininode_lock twice in wait_for_broadcast()
[tests] Make mininode_lock non-reentrant
Commit c67c1f2c032a8efa141d776a7e5be58f052159ea removing a double call to the parent method in P2PTxInvStore.on_inv is not relevant for Bitcoin ABC, as it fixes a bug that was never introduced in our codebase. We skipped that commit while backporting core#18807.
To make it work, the following additional change is needed for Bitcoin ABC:
Don't acquire mininode_lock twice in abc_p2p_avalanche.py. on_avahello, on_avapoll and on_avaresponse are called indirectly via mininode.P2PInterface.on_message, whit the lock already acquired.
This is a backport of core#19178