Wait for the previous app process died before restarting it

Add a wait-for-died in the startProcess if it finds the previous
process is bad and needs to be killed.

Bug: 141857656
Test: Manual - had to forge a fake "bad" app in the AMS to test it
Change-Id: Ia9c80aac42a4bef7affe9fecddae67311ef04c3c
2 files changed