cgroups: factor a bit how an optional subsystem is initialized

This is a preparative work for handling memory cgroup
cgroups: enable memory cgroup and collect memory usage
run: allow to set a memory limit to a task