[X11] Add support for EGL/GLESv2 when using X11

This adds EGL/GLESv2 support to the new X11 backend which doesn't use SDL anymore.

I don't see why this defined(X11) && defined(HAS_EGL) would include RPi on the RPi if X11 is not available. We could also write

#if defined(HAS_GLX) || (defined(HAS_EGL && defined(HAVE_X11))

to make clear that EGL && X11 is required for this piece of code.