Skip two more attach tests when testing against stub-like targets
This patch updates two attach tests to use utility procs for checking if
the attach test should run and for launching the program to be attached, as
follows:
1) Use can_spawn_for_attach instead of is_remote target
2) Use spawn_wait_for_attach instead of exec/sleep
Tested (1) with i686-mingw32 host and i686-pc-linux-gnu build/target and
both with x86_64 Ubuntu.
gdb/testsuite/ChangeLog:
* gdb.base/attach-pie-noexec.exp: Use can_spawn_for_attach
instead of checking whether the target board is remote and
use spawn_wait_for_attach instead of exec/sleep.
* gdb.base/attach-twice.exp: Likewise.