cgroup.c: clean up for handle_cgroup_settings
cgroup.c: clean up for handle_cgroup_settings

Clean up the nesting if, make the logic similar for memory
and cpuset, and the error message should sent from inside,
for better extendibility.

Signed-off-by: Qiang Huang <488e06933c295c76472a67dbc6657ac40a756953@huawei.com>
Signed-off-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@ubuntu.com>

thmo/lxc,Ponce/lxc,armcc/lxc,codebauss/lxc,ojkastl/lxc_Patches,fwilson42/lxc,virajs/lxc,ojkastl/lxc_Patches,regit/lxc,christiaan/lxc,caglar10ur/lxc,JohnPeacockMessageSystems/lxc,bmoar/lxc,christiaan/lxc,akshaykarle/lxc,efiop/lxc,DarknessBeforeDawn/lxc,caglar10ur/lxc,QingweiPeterLan/cs188-lxc,jirislaby/lxc,ss1h2a3tw/lxc,Distrotech/lxc,aeris/lxc,LynxChaus/lxc,hfuCN/lxc,major/lxc,hkjolhede/lxc,hfuCN/lxc,Distrotech/lxc,bmoar/lxc,virajs/lxc,ecarrara/lxc,hallyn/lxc,lazy404/lxc,regit/lxc,yubo/lxc,armcc/lxc,lisongmin/lxc,bostjan/lxc,LynxChaus/lxc,tych0/lxc,hallyn/lxc,raspberrypython/lxc,rldleblanc/lxc,hallyn/lxc,ecarrara/lxc,cjwatson/lxc,yubo/lxc,ioops/lxc,virajs/lxc,sapun/lxc,tych0/lxc,Pelagicore/lxc,szaszg/lxc,ysbnim/lxc,JohnPeacockMessageSystems/lxc,fwilson42/lxc,bmoar/lxc,QingweiPeterLan/cs188-lxc,ksperis/lxc,Ponce/lxc,Ponce/lxc,yubo/lxc,rldleblanc/lxc,tych0/lxc,rldleblanc/lxc,GreatFruitOmsk/lxc,ioops/lxc,hkjolhede/lxc,jirislaby/lxc,terceiro/lxc,ysbnim/lxc,rowhit/lxc,weizhenwei/lxc,rowhit/lxc,efiop/lxc,terceiro/lxc,JohnPeacockMessageSystems/lxc,armcc/lxc,GreatFruitOmsk/lxc,thmo/lxc,DarknessBeforeDawn/lxc,sapun/lxc,cjwatson/lxc,Pelagicore/lxc,efiop/lxc,lisongmin/lxc,ksperis/lxc,thmo/lxc,bostjan/lxc,QingweiPeterLan/cs188-lxc,federicobriata/lxc,caglar10ur/lxc,ss1h2a3tw/lxc,lazy404/lxc,weizhenwei/lxc,weizhenwei/lxc,akshaykarle/lxc,major/lxc,ecarrara/lxc,ioops/lxc,ojkastl/lxc_Patches,christiaan/lxc,szaszg/lxc,raspberrypython/lxc,ysbnim/lxc,LynxChaus/lxc,rowhit/lxc,ojkastl/lxc_Patches,fwilson42/lxc,Distrotech/lxc,lisongmin/lxc,codebauss/lxc,cjwatson/lxc,hkjolhede/lxc,sapun/lxc,raspberrypython/lxc,GreatFruitOmsk/lxc,major/lxc,ss1h2a3tw/lxc,codebauss/lxc,aeris/lxc,DarknessBeforeDawn/lxc,Pelagicore/lxc,aeris/lxc,akshaykarle/lxc,terceiro/lxc,ksperis/lxc,lazy404/lxc,jirislaby/lxc,szaszg/lxc,bostjan/lxc,federicobriata/lxc,hfuCN/lxc,regit/lxc,federicobriata/lxc