Enable -Wshadow for input code

To avoid common programming mistakes, enable -Wshadow for input code.
This requires several refactors, such as using range-based for loops and
avoiding repeating variable names that are already in scope.

To allow for -Wshadow, we convert to unordered_map and use a range-based
loop.

Bug: 142017994
Test: atest libinput_tests inputflinger_tests
Change-Id: Icb65045d3322eccc312bca63287e38897d9f9ff6
5 files changed