Gating USE_EXACT_ALARM by target sdk T

Added a compat change id for use of this permission. By default this
change will be enabled for apps targeting T or above.
Fixed and optimized the logic dealing with app-update permission
changes.

Separated out hasUseExactAlarm from hasScheduleExactAlarm to have
clearer meanings.

Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest
atest CtsAlarmManagerTestCases:ExactAlarmsTest

Bug: 218533173
Change-Id: I116323a4aed1e7cc103d4125cfd70c5230209120
6 files changed