Introduce concept of work types.

In preparation for dedicated Contexts for expedited jobs, introduce the
concept of work types. For now, this is just a refactor, so we only have
TOP and BG types. The refactoring also helps make it clearer how many
contexts are reserved for each type, though the numbers aren't changed
as part of the refactor.

Bug: 141645789
Bug: 171305774
Bug: 178119369
Test: atest CtsJobSchedulerTestCases
Test: atest FrameworksMockingServicesTests:JobSchedulerServiceTest
Test: atest FrameworksServicesTests:PrioritySchedulingTest
Test: atest FrameworksServicesTests:WorkCountTrackerTest
Test: atest FrameworksServicesTests:WorkTypeConfigTest
Change-Id: Ib6682cb16ef3944e1439d865400f8d48bf1d6890
6 files changed