bridge: Open cgroups directory atomically
bridge: Open cgroups directory atomically

Use openat() and a singe plain read() to open a cgroups directory for
the internal cgroups metrics, instead of g_file_get_contents().

This provides a more consistent look at the current state and should
avoid race conditions with groups going away while reading them. It also
makes the code more efficient, which is reasonably important for
metrics channels.

mvollmer/cockpit,moraleslazaro/cockpit,garrett/cockpit,martinpitt/cockpit,mvollmer/cockpit,cockpit-project/cockpit,martinpitt/cockpit,moraleslazaro/cockpit,deryni/cockpit,mvollmer/cockpit,deryni/cockpit,garrett/cockpit,deryni/cockpit,moraleslazaro/cockpit,moraleslazaro/cockpit,garrett/cockpit,deryni/cockpit,deryni/cockpit,cockpit-project/cockpit,martinpitt/cockpit,moraleslazaro/cockpit,garrett/cockpit,deryni/cockpit,moraleslazaro/cockpit,cockpit-project/cockpit,martinpitt/cockpit,cockpit-project/cockpit,martinpitt/cockpit,moraleslazaro/cockpit,mvollmer/cockpit,garrett/cockpit,cockpit-project/cockpit,deryni/cockpit,mvollmer/cockpit