split out cgroups lib and do things (more) proper

See https://github.com/vodik/clique as the upstream source