Wayland detect connection

Currently, one always needs to set ```SDL_VIDEODRIVER=wayland``` in the environment. Fix this by properly detecting if a Wayland server is running and make it available in that case. This is modeled after the connection detection code in X11.