Tests: add waitforfile() and waitforsocket() functions.

This functions add ability to wait for external daemons to start before running
tests.
2 files changed