Offer listener to observe StrictMode violations.

Primarily used by tests to be more robust, since reading raw logcat
data recently became very flaky.

Bug: 37915178
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.StrictModeTest
Change-Id: I3f12508bb6206c53005356b5d8d9ba57aac2436e
1 file changed