tests: Skip assert-msg-test.py if gdb fails
Similar to commit 6e44151b, skip the test if gdb is unable to read /proc/PID/mem, which gdb does as a fallback if ptrace is unavailable.
This allows the test to skip when run under Gentoo's sandbox.
(cherry picked from commit 19a8df9d)
Backport of !3304 (merged)