scheduler: Detect single event gestures correctly

When a single event gesture such as a press (i.e., a single touchstart
event) is observed, the scheduler would previously wait for two
subsequent touchmove events before deciding the gesture was established
and stop blocking tasks unrelated to input handling. The problem was
that with single event gestures, these additional events are never sent,
so the scheduler would remain in 'touchstart' mode for 100ms, possibly
causing important tasks to get delayed.

This patch fixes the issue by telling the scheduler how the touchstart
event was handled. If the event handler calls preventDefault() on the
event, the scheduler can immediately conclude that the gesture is
handled by the main thread without waiting for any further events. If
preventDefault() is not called, we maintain the previous behavior.

BUG=639300

Review-Url: https://codereview.chromium.org/2661443003
Cr-Commit-Position: refs/heads/master@{#446921}
20 files changed