Refactor App Standby code

Move the App Standby code out of UsageStatsService into
an AppStandbyController class. This doesn't change any
behavior. Also, it doesn't change the entry points, which
are still in UsageStatsManager. The binder APIs are still
in UsageStatsService and are forwarded to
AppStandbyController.

This change is in preparation for switching to app standby
buckets instead of a boolean state.

Bug: 63527785
Test: adb shell dumpsys usagestats
      adb shell am set-inactive <packagename> true
      // Ensure state changes are persisted

Change-Id: Ic94357bdc891d1defae37bb29d533b6153a09967
2 files changed