Set minimum Windows wait time to 1 ms in MessagePumpDefault::Run

On Windows if we call event_.TimedWait(delay); with a sub-ms delay
then the wait function will return immediately. This means we end up
busy waiting down to zero. Rounding these times up to 1 ms lets Chrome
go idle and saves a few percent of a core on some tests.

The symptom to watch for is lots of time being spent in QPCNow, called
from MessagePumpDefault::Run or from MessageLoop::DoDelayedWork.

This is the second attempt at fixing this bug. The first attempt tried
rounding down the short delays but this was stymied by other code that
didn't respect the rounding down.

One known problem is that some animations that try to run at 60 fps by
using setInterval(C,16) will drop from ~60 fps to ~58 fps. Those that
use requestAnimationFrame run at a steady rate of 60 fps.

BUG=487724

Review URL: https://codereview.chromium.org/1154953002

Cr-Commit-Position: refs/heads/master@{#331226}
1 file changed