lib/waiter: Add timeout waiters