InputDispatcher: Refactoring to prepare for spy windows

We do some refactoring to make it easier to implement spy windows as
outlined in go/spy-windows.

Bug: 162194035
Test: atest inputflinger_tests
Change-Id: Ie45d93811d8f28afe45583615be3c0423bd39e57
2 files changed