The render crate's placed-document tests decided results by wall-clock
time:
- The gate that holds the background worker opened by itself after 10 s,
so a test that forgot to open it still passed. It is now a mutex and a
condition variable with no time limit, opened when the guard that
shut_gate returns is dropped (also when the test fails).
- settle polled busy() every 5 ms for up to 10 s. It now waits on
placed_document::wait_idle, which a condition variable signals when
the last pending bitmap is finished.
- The self-placing document test asserted that drawing took under 10 s.
It now asserts how deep the drawing went (at least 2 levels, at most
MAX_DEPTH), read from a test-only counter kept by the depth guard.