detect server error in getpidcgroup.c

and add missing #include to it and chowncgroup

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
warn on write errors

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