Refactor sendCrashBroadcast to avoid flakiness.

It appears that the test app can get stuck in an unlaunchable state
sometimes after crashing. Force kill the testapp after it is launched to
ensure we can continue to launch it enough times in the time window
required to trigger the watchdog.

And other miscellaneous cleanup.

Bug: 139108668
Test: Using acloud device, atest StagedRollbackTest:com.android.tests.rollback.host.StagedRollbackTest#testBadApkOnly
Change-Id: I30e6c9bdbcff4725b5a0e1b2b83cbbd2e217b290
1 file changed