Limits the runtime of client.mangle_suspend test and adds sched_yield to wait loops.
Fixes #3333 (closed)