mouse: only clear scroll remainders after 1 second

When scrolling slowly on the Microsoft Surface Precision mouse, with
high-resolution scrolling enabled and with the wheel in smooth mode, the
page wasn't moving. This was due to `IntegralGestureFilterInterpreter`
resetting its remainders every time `SyncInterpret` was called (i.e.
every evdev `SYN_REPORT`). (Apparently, the reason the remainders need
resetting at all is to allow recordings to be replayed consistently.)
Changing it to only reset after a second of inactivity fixes this.

The 1-second deadline meant using a timer, so also moved some common
logic from `FlingStopFilterInterpreter` into `FilterInterpreter`.

BUG=chromium:888172
TEST=scroll slowly on MS Surface Precision, check that the page scrolls;
     run touchtests and unit tests

Change-Id: Ic5a4ef887100badf2fa29162232a6ff3cc0148bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/2135286
Tested-by: Harry Cutts <hcutts@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
Commit-Queue: Harry Cutts <hcutts@chromium.org>
9 files changed