Avoid using raw pointers in QueuedInputListener

The previous code was correct, but we can simplify it by converting to
unique_ptr.
This should give us a different crash signature next time, and maybe
provide us with more clues about the cause.

Bug: 217647732
Test: atest inputflinger_tests
Change-Id: I700de2bea60a4fc1cac65e9bc6ac082d863e52b1
(cherry picked from commit 542398ea57f3f55ed16c7bb49e5ec080b7d1f79c)
2 files changed