Reset some threads after test finishes.

Occassionally production code schedule delayed messages to other threads
that hold references to mocks of finished tests. Note we never recreate
a new thread for new tests, or clear messages of these queues, so it's
possible it still uses mocks after they're cleared and cause crashes.

Bug: 122846381
Test: tradefed.sh run commandAndExit WmTests --include-annotation
android.platform.test.annotations.Presubmit --exclude-annotation
androidx.test.filters.FlakyTest
Change-Id: I3ba8f94689ddf633f2d18c74917fa3891c689351
3 files changed