Add logic to overwrite pointer coordinates if event time is too old

Included OldEventReceivedAfterResampleOccurs from
TouchResampling_test.cpp, and added the missing logic in LegacyResampler
to pass the test. The CL wrongly assumes pointer information guarantees
between motion events, that is, pointer IDs can appear in different
order between samples. This issue is fixed in the second to last CL in
the relation chain by using an associative array as a data structure to
store and access pointer properties and coordinates.

Bug: 297226446
Flag: EXEMPT refactor
Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="InputConsumerResamplingTest*"
Change-Id: I41cb79eaba965cfdfe7db68c388cb5d0ffa406f3
diff --git a/include/input/Resampler.h b/include/input/Resampler.h
index f04dfde..47519c2 100644
--- a/include/input/Resampler.h
+++ b/include/input/Resampler.h
@@ -166,6 +166,12 @@
      */
     void overwriteStillPointers(MotionEvent& motionEvent, size_t sampleIndex) const;
 
+    /**
+     * Overwrites the pointer coordinates of a sample with event time older than
+     * that of mPreviousPrediction.
+     */
+    void overwriteOldPointers(MotionEvent& motionEvent, size_t sampleIndex) const;
+
     inline static void addSampleToMotionEvent(const Sample& sample, MotionEvent& motionEvent);
 };
 } // namespace android