Set app-op for restricted pre-22 apps

For these apps the permission is always granted and the grant state is
encoded into the app-op.

Also, unify syncOps* for restricted and foreground permissions into one.

Test: atest RestrictedPermissionsTest
            SplitPermissionTest
Bug: 134500512
Change-Id: I2250a52d2250752c74907b3a9789ed45a4c75390
3 files changed