Re-create cgroups if necessary

If a task had cgroups, these should be restored. (Also any properties of
cgroups, but this commit doesn't do that yet.)