Revert "cgroup: simplify threadgroup locking"