Rewrite "waitForObject" for notification UI

Tests consistently fail due to standard scrolling assumptions not being
applicable to the notification UI. We address this by writing our own
version of waitForObject, waitForNotification, that deals with these
issues. Namely

- Instead of ANY scrollable, it only scrolls the notification list (as
identified by the resource id)
- The end of the list is determined by when the "Clear all" button
appears (the standard way does not work as it continues to scroll until
the notification panel is closed)
- Resetting to the top is done by closing and opening the notification
list again

We also move a lot of common utility to AppHibernationUtils to be used
by both AutoRevokeTest and AppHibernationIntegrationTest

Bug: 191506099
Test: atest AutoRevokeTest
Test: atest AppHibernationIntegrationTest
Test: forrest runs
Change-Id: I99bb2eca81f40835ef279ddd714574c24ed8776f
3 files changed