Refactor resampler logic to constrain MotionEvent mutation

Refactored resampler logic to constrain the functions where MotionEvent
can mutate.

Bug: 297226446
Flag: EXEMPT refactor
Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="ResamplerTest*"
Change-Id: I4b9c9140b73cd45f866dc51931b03cdf2883e5a3
2 files changed