Add support to get historical app process exit reason

Apps can call ActivityManager.getHistoricalProcessExitInfos() to
get the historical process exit reason now.

Also add the below command to support dumping of the information
$ adb shell dumpsys activity exit-info [package name]

Bug: 136036078
Test: atest ApplicationExitInfoTest
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: I634f247e42a7e8e4535eedd76cf84089abdf1129
22 files changed