wayland: Determine availability based on display connection

Just like in X11, try to connect to the Wayland display, and
if that succeeds, close the connection and return success.
Merge pull request #26 from thp/wayland-detect-connection

Wayland detect connection