cgmanager.c memory management improvements.

- cgmanager_get_pid_cgroup(): Use NIH memory allocation to avoid crash.
- cgmanager_create(): USE NIH memory allocation to simplify memory
  management.

Signed-off-by: James Hunt <james.hunt@ubuntu.com>