wayland: Fix crash when handling a keyboard enter event for a destroyed window
wayland: Create the right type of GL context (desktop or ES).

Before, the backend would always create an OpenGL ES context if support for
OpenGL ES was available, even when asked to create a non-ES OpenGL context.