cgroup: address some style+safety issues

three issues raised by Christian Seiler: use pid_t, use snprintf,
and use const.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>