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.
Merge pull request #3451

5fe19d6 qt: make wallet test consistent (Wladimir J. van der Laan)