dump: Rework task stats parsing and dumping
dump: Rework task stats parsing and dumping

Move the /proc/pid/stat parsing before anything in dump_one_task (prepare
for zombies dumping) and cleanup the rest of the code accordingly.

Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>
Signed-off-by: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@openvz.org>

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