qt: make wallet test consistent

Add a function `WaitBlocks` to wait for blocks to propagate to all three nodes, and use this instead of waiting a fixed time of one second.

Fixes #3445.

Let's see what the pulltester does.