Ensure stale event does not cause ANR

Does a stale key event cause 'no focused window' ANR? It shouldn't, but
it wasn't already covered by tests.

Adding a test for that here to explicitly check the behaviour.

Bug: 219401047
Test: atest inputflinger_tests:InputDispatcherSingleWindowAnr
Change-Id: I0b1e33a7e705a4b968e3159bd15c70f00eda0191
(cherry picked from commit 673ce1e6dd1b18a293afacd6fc4e549a2e904f63)
3 files changed