libcutils: only change cgroup when fd is initialized [ DO NOT MERGE ] am: e46aae2236  -s ours
am: dcc33fcc01  -s ours

Change-Id: I6a79bca788b5292d3a2b934a2e88ccd20e86d372