Allow a11y listeners to specify handlers

This follows recommended practice for listeners, and also
allows ViewRootImpl to register for callbacks on its own
handler, which can prevent crashes in apps that have
different threads managing the UI at different times (for
example the system process).

Bug: 37542371
Test: Adding CTS tests for new APIs. A11y CTS still passes.
Change-Id: I65db025275e153c20b20567346246d5bc13bf418
7 files changed