Reset velocity for pointers that have been canceled

To fully support palm rejection, we should not produce any velocity for
pointers that have been marked as palm.

This can be achieved by erasing the corresponding pointer state in
VelocityTracker for ACTION_POINTER_UP with FLAG_CANCELED events, or for
all pointers in ACTION_CANCEL events.

The pointers that have not been canceled will still produce the correct
velocity.

Bug: 236772648
Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Change-Id: I67ecae6b4bff2eb63f9cff416841031dea3ed680
diff --git a/include/input/VelocityTracker.h b/include/input/VelocityTracker.h
index 2e99495..ee74455 100644
--- a/include/input/VelocityTracker.h
+++ b/include/input/VelocityTracker.h
@@ -98,7 +98,7 @@
     void addMovement(nsecs_t eventTime, int32_t pointerId, int32_t axis, float position);
 
     // Adds movement information for all pointers in a MotionEvent, including historical samples.
-    void addMovement(const MotionEvent* event);
+    void addMovement(const MotionEvent& event);
 
     // Returns the velocity of the specified pointer id and axis in position units per second.
     // Returns empty optional if there is insufficient movement information for the pointer, or if