Deal with alarm times near MAX_VALUE

Avoid overflow across the end of time when calculating window endpoints, and
clamp recurrence periods at something workable but too long to be plausible.

Bug: 70536740
Bug: 72658919
Test: manual
Test: atest CtsAppTestCases:AlarmManagerTest

Change-Id: Icb7a571802b722499df09833522d1d3f28607621
2 files changed