Fixing "wait for task" procedure for tests.
Merge branch 'master' of https://github.com/Evolveum/midpoint