Issue #18940: Handled low-volume logging when delay is True.
Issue #18941: Respected delay when doing rollover.
Close #18849: Fixed a Windows-specific tempfile bug where collision with an
existing directory caused mkstemp and related APIs to fail instead of
retrying. Report and fix by Vlad Shcherbina.