Merge "Further refactor UidPermissionState and GIDs."