tty: Don't try to restore a group on inherited terminal if session leader present
tty: Don't try to restore a group on inherited terminal if session leader present

In case if we are migrating a session leader task with a solely
slave peer we should not try to restore a group on the terminal
but rather simply inherit it, because a session of the group of
the inherited terminal is not the same as a session of our leader
thus kernel refuse to set any different group here.

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

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