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
clipboard: support separate '+' and '*' clipboards
clipoard: handle linewise/charwise selections correctly
clipboard: clean up unnamedclip logic
change option "unnamedclip" back to "clipboard=unnamed/unnamedplus"

This allows to configure which of '*' and '+' should be used for
the unnamed clipboard
WIP: clipboard test in  lua
clipboard: fix `let @+ = ...` and add test