unix: wait for listen() as well as bind()
unix: wait for listen() as well as bind()

We need to wait for listen() as well as bind() for internal unix sockets, or we
can race like this:

(00.135950)      1: Opening standalone socket (id 0xb ino 0x9422f peer 0)
(00.135974)    353: Error (sk-unix.c:701): Can't connect 0x947c4 socket: Connection refused
(00.136390)      1: Error (cr-restore.c:1228): 353 exited, status=1
(00.136407)      1:  Putting 0x9422f into listen state

(where 0x9422f is the peer for 0x947c4)

This race was pretty rare for me, but I've run 1000 tests and it didn't
happen so hopefully this patch fixes it :)

Signed-off-by: Tycho Andersen <10c18fcb898ee6b17d6575d444b125d10b3f4d6a@canonical.com>
Acked-by: Andrew Vagin <74c05afa918858348d6db8037d82fa8124870113@odin.com>
Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>

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