Make all permissions per-user.

This affects how we do APIs and persistence, so it has to be
accomplished first.

Although both install and runtime permissions are per-user now, we
still need to record whether a permission was granted as an install
permission or a runtime permission, so that we can act accordingly
upon install <-> runtime permission type change.

This change also moves the areInstallPermissionsFixed state into
permission, which is a per-package state.

Bug: 158736025
Test: atest CtsPermissionTestCases
Change-Id: I4aad998cddee13ff0c19c84d6d473abc7a6e7019
10 files changed