KeyboardInputMapper: Miscelaneous code cleanup

Initialize all members at construction, make some functions static,
remove some unused parameters, and use an optional return type for
clarity.

There should be no behavior changes in this CL.

Bug: 245989146
Test: atest inputflinger_tests
Change-Id: Ia57d1c88f0d60938a5e803f51d99c335e7fcf459
2 files changed