test: fix race condition in launcher

Fix the code launching the debugged process and a debugger connection
to wait for "Debugger listening" message before opening the TCP
connection.