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.