macOS: Locate tccd's per-user database via its container on macOS 27+
Starting with macOS 27, tccd's per-user TCC.db moved out of
~/Library/Application Support/com.apple.TCC into a randomly named
container under /private/var/containers/Data/ProtectedSystem. The
container UUID is assigned by containermanagerd at container
creation time and isn't derived from anything we can compute or
rely on staying put, so we look it up by identifier instead,
matching on MCMMetadataIdentifier in each container's
containermanagerd metadata plist.
The system-wide database, owned by "tccd system" running as root,
is unaffected and stays where it always was, so we only take this
detour for the per-user services (microphone, Bluetooth).
While here, rename the service|path pairs to service|scope, using
"user"/"system" instead of embedding $HOME or / directly, since the
path is no longer a simple function of the scope on newer macOS.
Change-Id: I8db909c7df355d568e4e021e18e7a5c6ebc52a71
Reviewed-by: Aku Pietikäinen <aku.pietikainen@qt.io>
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>