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: 143459140
Test: presubmit
Change-Id: I0ef0b3a0820ce643486cec5d9cbeb0f593344ee6
Merged-In: I0ef0b3a0820ce643486cec5d9cbeb0f593344ee6
(cherry picked from commit 767917f075b1abfd8cc5905843021b7c3a468be9)
2 files changed