gdb/testsuite: fix race in gdb.base/async-shell.exp