criu: tty: pick only master as a control terminal
criu: tty: pick only master as a control terminal

tty_find_restoring_task will prepare control terminal (by tcsetpgrp)
only if tty is master.
By a chance it's possible to pick slave terminal as a control, which
will refrain restoring control terminal.

https://jira.sw.ru/browse/PSBM-42093

Signed-off-by: Dmitry Safonov <5aea3f9692c8a01793193334616ae8fad2bc748a@odin.com>
Reviewed-by: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@openvz.org>
Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>

ldu4/criu,efiop/criu,wtf42/criu,svloyso/criu,KKoukiou/criu-remote,eabatalov/criu,tych0/criu,efiop/criu,fbocharov/criu,svloyso/criu,ldu4/criu,efiop/criu,eabatalov/criu,AuthenticEshkinKot/criu,wtf42/criu,ldu4/criu,wtf42/criu,fbocharov/criu,AuthenticEshkinKot/criu,ldu4/criu,fbocharov/criu,efiop/criu,svloyso/criu,fbocharov/criu,tych0/criu,KKoukiou/criu-remote,eabatalov/criu,eabatalov/criu,fbocharov/criu,AuthenticEshkinKot/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu,tych0/criu,svloyso/criu,fbocharov/criu,eabatalov/criu,svloyso/criu,wtf42/criu,AuthenticEshkinKot/criu,efiop/criu,wtf42/criu,svloyso/criu,KKoukiou/criu-remote,KKoukiou/criu-remote,ldu4/criu,ldu4/criu,eabatalov/criu,tych0/criu,wtf42/criu,efiop/criu,tych0/criu,tych0/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu