[gdb] Use gdb::waitpid more often

Use gdb::waitpid instead of plain waitpid, making sure that EINTR is handled.

Tested on x86_64-linux.
11 files changed