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