Extract `timeout`, `resolution` and `waitForPredicate` into a "wait-for" or somesuch trait.