188.8.131.52: deadlock detection fixes
* The same deadlock may be reported in multiple threads: adjust tests
to account for that.
* CHECK-DEADLOCK/DEADLOCK-CHAIN could signal an error if the deadlock
had disappeared between its detection and building up the chain due
to one of the involved threads unwinding.
To flush out issues like this a bit better, added looping to some
of the deadlock tests.