Protect a11y against multi-threaded UIs

It seems that the accessibility event dispatch is very
susceptible to multi-threaded UIs. This CL tries to handle
that situation gracefully. I'm thinking in P I can throw
an exception when events are dispatched on the wrong
thread, but it seems late to introduce such a behavior in O.

Bug: 62201606
Test: Ran a11y cts and unit tests.
Change-Id: I50b857667d8c3ae51a085afb15acefccbef4b762
(cherry picked from commit 6aef793180d37e992906a56e9cecf782e5e3b716)
1 file changed