Convert touchpad gestures into pointer moves & clicks

While the gestures library may return some events asynchronously (which
will require some changes to InputReader to handle), most are returned
during the call to PushHardwareState, allowing us to handle them easily.
Here we handle mouse movement, clicks, and drags.

I was going to send the BUTTON_PRESS events before the DOWN events, as
we'd discussed changing as part of the click event consistency work, but
doing so results in an input event injection failure from the
dispatcher, so for now I've kept the order the same as for mice.

Bug: 251196347
Test: connect Apple Magic Trackpad 2, move, click, and drag
Test: atest inputflinger_tests

Change-Id: I3a60ea6bd166bdb9b628f5a17d9e1b6e7341ba42
2 files changed