Add a heuristic to tune how long log slot close waits.

Depending on how much contention there is for the available slots.