Use std::map for fallback keys

Before this CL, custom data structures were used to store fallback keys.
Those structures have some known bugs. To fix this, convert to std::map
and use std::optional to store the result of fallback key lookup.

Bug: 278299254
Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests
Change-Id: Id37c41694d0b4cfa2ae107b7db13e9389d21c562
3 files changed