Introduce thread based predicates
Issue #16: Improve Object.wait() detection