Recording alarm removal reasons for debugging

If an alarm is removed from the service for some reason, the bugreport
contains no useful information about it. Recording the last 10 removes
with their reason. For now, the set of reasons includes:
 - Data cleared on the calling app.
 - App requested to cancel it.
 - Exact alarm permission revoked.
 - PendingIntent used to set the alarm was cancelled.
More reasons can be added as seen useful in the future.

Test: adb shell dumpsys alarm
atest FrameworksMockingServicesTests:com.android.server.alarm
atest CtsAlarmManagerTestCases

Fixes: 184677899
Change-Id: I9d67b90572b5d731ad5d224ae7d537ae176508d5
2 files changed