finalize cgroups correctly
finalize cgroups correctly

We need to finalize the cg yard both on successful cgroup restore and on a
failed restore. Further, we should restore the cgroup properties before
allowing the task to continue in all modes (previously properties were only
restored correctly in --restore-detached mode).

CC: Saied Kazemi <4b05cea9641ab3f4544bc7c6e600aab00faa2e7f@google.com>
Signed-off-by: Tycho Andersen <10c18fcb898ee6b17d6575d444b125d10b3f4d6a@canonical.com>
Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>

fbocharov/criu,rentzsch/criu,gablg1/criu,wtf42/criu,fbocharov/criu,rentzsch/criu,sdgdsffdsfff/criu,fbocharov/criu,KKoukiou/criu-remote,rentzsch/criu,LK4D4/criu,LK4D4/criu,biddyweb/criu,gonkulator/criu,ldu4/criu,eabatalov/criu,ldu4/criu,tych0/criu,svloyso/criu,rentzsch/criu,gablg1/criu,fbocharov/criu,tych0/criu,svloyso/criu,AuthenticEshkinKot/criu,gablg1/criu,tych0/criu,marcosnils/criu,efiop/criu,svloyso/criu,gonkulator/criu,KKoukiou/criu-remote,marcosnils/criu,biddyweb/criu,ldu4/criu,rentzsch/criu,gonkulator/criu,wtf42/criu,eabatalov/criu,biddyweb/criu,gablg1/criu,gablg1/criu,tych0/criu,wtf42/criu,marcosnils/criu,sdgdsffdsfff/criu,AuthenticEshkinKot/criu,biddyweb/criu,fbocharov/criu,gablg1/criu,sdgdsffdsfff/criu,AuthenticEshkinKot/criu,tych0/criu,biddyweb/criu,KKoukiou/criu-remote,tych0/criu,efiop/criu,ldu4/criu,sdgdsffdsfff/criu,wtf42/criu,biddyweb/criu,svloyso/criu,LK4D4/criu,eabatalov/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu,LK4D4/criu,gonkulator/criu,wtf42/criu,efiop/criu,ldu4/criu,sdgdsffdsfff/criu,svloyso/criu,efiop/criu,AuthenticEshkinKot/criu,rentzsch/criu,eabatalov/criu,AuthenticEshkinKot/criu,KKoukiou/criu-remote,efiop/criu,LK4D4/criu,eabatalov/criu,fbocharov/criu,svloyso/criu,LK4D4/criu,ldu4/criu,marcosnils/criu,wtf42/criu,gonkulator/criu,gonkulator/criu,KKoukiou/criu-remote,efiop/criu,marcosnils/criu,eabatalov/criu,sdgdsffdsfff/criu,marcosnils/criu