Moving AppStateTracker to apex directory

Initial change to move the code. Refactorings and cleanup will be done
in a follow up.

Test: make -j
atest FrameworksMockingServicesTests:com.android.server
atest CtsAlarmManagerTestCases
atest CtsJobSchedulerTestCases

Bug: 159041453
Change-Id: I39456a02686cd6fa6d191442ce7a90f41f4d11dd
14 files changed