Make sure TAPL waits for Launcher activity to stop each time it stops

This helps to ensure that the test doesn't proceed while the activity is
still stopping and it's state hasn't settled.

We introduce a count of STOP events and make sure it's 0 except for
cases where stops are safe to ignore or we have waited for them.

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: I51c73c89854fcaa390d47a57389da18b2ce0ee6c
6 files changed