test: Add gdbserver support on helpers.lua

The $GDB env var can be set to run tests under gdbserver. If $VALGRIND is also
set, it will add the --vgdb=yes command-line option to valgrind instead of
starting gdbserver.
Merge PR #1527 'Add gdbserver support on helpers.lua'
clipboard: check for X on every invocation

xsel and xcopy may be available even if a valid X display is not. Also,
the availability of X may change at any time, so check on each
invocation.

Closes #1509.
Merge pull request #1525 from justinmk/clipboardX

clipboard: check for X on every invocation
Remove crypto