Validate that ui::Event::time_stamp comes from the same clock as TimeTicks::Now

Generalize existing X11 event timestamp's clock mismatch detection logic and use
it on all platforms. On X11 deviation from system clock is not exceptional so
after  detection we correct by falling back to TimeTicks::Now(). On all other
platforms, this is an exception so we assert and fail (only on DCHECK builds).

Other changes:
- add hooks to allow mocking underlying tick clock used in ui/events.
- fix bug in textfield double click detection logic where small timestamp values
led to breakage.

BUG=614409

Review-Url: https://codereview.chromium.org/2007083002
Cr-Commit-Position: refs/heads/master@{#401987}
14 files changed