fix race condition in async log

There is a race condition in log.ml. If Rotation.should_rotate is called just before the rollover time, and then some of the blocking operations immediately following take enough time to push us over the rollover time, the log isn't rolled over.

This patch should fix it.