[gdb/testsuite] Add have_startup_shell

Say we disable startup-with-shell, we get:
...
(gdb) run `echo 8`^M
Starting program: a2-run `echo 8`^M
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib64/libthread_db.so.1".^M
usage:  factorial <number>^M
[Inferior 1 (process 10787) exited with code 01]^M
(gdb) FAIL: gdb.base/a2-run.exp: run "a2-run" with shell (timeout)
...

Fix this by only doing this test if startup-with-shell is supported.

This fixes the test-case on msys2-ucrt64, where startup-with-shell is not
supported.

Likewise in other test-cases.

Tested on x86_64-linux.
6 files changed