xwayland: Refactor glamor EGL init
This goes on top of @tmlind 's merge request !561 (merged)
Glamor requires at least big GL 2.1 or GLES2, therefore Xwayland tries to initialize first GL and then GLES2 if that fails.
It does that all in one single function which makes the code slightly complicated, move the initialization of big-GL and GLES2 to separate functions to help with readability of the code.