wayland/egl: misc fixes and cleanups