[FIXED JENKINS-20965] Run.writeWholeLogTo causes high CPU usage.
Wait one second before writing to log files. Switched to while loop to
prevent extra one second delay.
Merge branch 'JENKINS-20965' of github.com:christ66/jenkins
[JENKINS-20965] Noting merge of #1137.