cgroup: Use xmalloc in rewrite_cgsets

We prefer x* helpers because they print error
in case of allocation failures.

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

We've a special helper xrealloc_safe for reallocs.

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