Add logic to re-raise ANR dialogs if the user taps wait.

When the user taps "wait" on the ANR dialog, redisplay the dialog
after a specified timeout (currently 5 seconds). If the app becomes
responsive, cancel any pending delayed dialogs and dismiss the
dialog if it's currently visible.

Bug: 171218828
Test: manual (test app)
Test: atest AnrTest
Change-Id: I4ca34bb8cc60bcde3ff571566553f44246d78ddc
6 files changed