Prevent use of invalidated iterator

If the underlying container changes, such as by deleting an element from
it, all of the outstanding iterators get invalidated.

Currently in EventHub, we are using a for loop to go through the entire
map, and deleting the map contents from inside this loop.

To avoid this, do not store the iterators explicitly.

Bug: 163171599
Test: atest inputflinger_tests:EventHubTest#InputEvent_TimestampIsMonotonic
Test: atest inputflinger_tests
Change-Id: I3af0721d54cc03668a68848f6f690a2d523e809b
diff --git a/services/inputflinger/Android.bp b/services/inputflinger/Android.bp
index 28cce47..a0de607 100644
--- a/services/inputflinger/Android.bp
+++ b/services/inputflinger/Android.bp
@@ -25,6 +25,9 @@
         "-Wshadow-field-in-constructor-modified",
         "-Wshadow-uncaptured-local",
     ],
+    sanitize: {
+        misc_undefined: ["bounds"],
+    },
 }
 
 /////////////////////////////////////////////////