Fix potential overflow with casting long to int in AppExitInfoTracker

It'll result in unexpected behavior during sorting.

Also updated the test case to capture this case.

Bug: 186132521
Bug: 189975360
Test: atest ApplicationExitInfoTest
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: I7542f73b1acf4ddee16f712d0d97223e151935f7
2 files changed