cgroup: prepare_cgroup_dirs -- Add some more debug printouts

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cgroup: Simplify add_cgroup

 - xfree works well with nil argument no need for additional tests.
 - no need for @ret variable, we either success returning 0 explicitly,
   either fail with explicit -1

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cgroup: Use snprintf in collect_cgroups

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cgroup: Use snprintf in move_in_cgroup

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>