Handle clock reset more gracefully

The gesture library implicitly assumes that timestamps will be
monotonically increasing.  If the clock goes backward, or has a value of 0.0,
gestures will not be detected correctly. This CL allows timestamp values
of 0.0, and allows clock resets when there are no fingers touching.

With this CL, we still assume that timestamps will be non-negative, and
that the clock will not reset with fingers touching.

BUG=b:65041115
TEST=Tested manually on lux using MSC_TIMESTAMP as the timestamp value
fo the gesture library.  MSC_TIMESTAMP resets to 0.0 whenever the no
finger is touching for more than a second.  Also tested using the
touchtests suite, changing the timestamps to act like MSC_TIMESTAMP.

Change-Id: Ib2e83022a0e714f3d228515e90afbd8a59031978
Reviewed-on: https://chromium-review.googlesource.com/938848
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>
5 files changed