fix #3929, log rotation is broken when MAX_NUM_<SUBSYS>_LOG > 1.
This comming also fixes the windows-only bug where having a log file with
an extension > .old that isn't part of the standard log extension
pattern will put the log rotate code into an infinite loop.
===VersionHistory:Pending===
Merge branch 'V8_0-branch'