Add test to ProcessRecord ANR function

The test will cover ProcessRecord#appNotResponding. Status related to
the Process will be tested. It covers the code path related to parent
process to avoid possible NPE in future.

Necessary refactor is there to support the test.

Test: atest ProcessRecordTests
Bug: 117927743
Change-Id: I127020177be0db82158c20102323458f718d3c60
3 files changed