Guarantee that scroll/swipe end gestures are sent

If the previous gesture was a scroll or swipe and a different gesture is
detected, send the corresponding scroll/swipe end gesture instead of the
detected gesture.

BUG=b:67736270
TEST=Deploy to device, unable to reproduce bug and behavior is normal.
Also passes touchtest suite, including new test.

Change-Id: I2a3e6b6d6571aeeb69212fe83647a6404d8161e6
Reviewed-on: https://chromium-review.googlesource.com/726272
Commit-Ready: Sean O'Brien <seobrien@chromium.org>
Tested-by: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
2 files changed