Tidy up all service state when done executing

In particular, make sure to note that a no-longer-executing service is
also no longer "foreground" for purposes of procstat sanity-checking.

Fixes: 113926404
Test: manual
Test: atest CtsAppTestCases:.ServiceTest
Change-Id: I11db26820adf9cc8fb97dea8e569915c9bbc93b5
1 file changed