Don't include time to run event handlers in 1000ms window.

In other words, ignore mousedown events that occur <1000ms after the last
touchstart handler has finished running, rather than 1000ms after the touchstart
event.

Fixes #17634.
(cherry picked from commit db467f31dc27a3eebdd3b3d43856479c2f3151c4)