Reapply "Adapt to libprocessgroup API changes for polling on cgro..."

This reverts commit 4a11b111c17533d530e8e568073a9c20286a42bd.

This change was originally reverted due to a bug in the child commit of
a change in the same topic which caused process group kills not to occur
when using cgroup.kill. Now that has been fixed, bring back this change
with the fix.

Bug: 301871933
Change-Id: I81dde53f21ba2e01c01dfd5f7009ea1ef690b582
2 files changed