Reduce the usage of goto statements in dispatcher

Currently, there are a lot of uses of goto statements in
InputDispatcher, which makes the code hard to follow. Instead, remove
some unused code and reduce the goto usage.

Bug: none
Test: none
Change-Id: I0ef0b3a0820ce643486cec5d9cbeb0f593344ee6
2 files changed