WIP: temporary fix for detecting the end of a round for the replay system.
It's temporary because it's not actually safe, it just works with high probability.
(The logging system probes repeatedly, but not atomically, to detect when all
 workers are idle.)

The proper fix will use the "idle" IORef itself, which can be operated on atomically.