Make tracking notification ttls more performant

By only using 1 alarm instead of 1 per notification.

Also, enabled NMSTest to be parameterized with flags. This required some
more mocking and cleanup steps to keep memory usage under control when
running so many more tests.

Test: NotificationManagerServiceTest
Test: TimeToLiveHelperTest
Bug: 331967355
Flag: com.android.server.notification.all_notifs_need_ttl DEV
Change-Id: If6cff0fa4667b48def17c7ec1b4aa78340d335b7
9 files changed