[SPARK-3562]Periodic cleanup event logs

link #2391 
Hmmm. Wonder if we should add a version of `Utils.memoryStringToMb` for time (so that you could write `1d` instead of that big number).