Requesting network exception for app idle jobs.

When using the rolling quota system, jobs may have quota but not be
granted access to the network because of standard app idle restrictions.
This attempts to get the app access to the network only while the
relevant jobs are able to run. If there are no network-dependent jobs
for a UID that are able to run with connectivity granted, then the
exception is revoked.

Bug: 117846754
Bug: 111423978
Test: atest FrameworksMockingServicesTests
Change-Id: I9e3c4badd50dfdaa1c23f67534c0f02a4030a27c
8 files changed