This commit creates a new utility library, eglutil.h, which contains code to detect and use EGL_KHR_swap_buffers_with_damage or its EXT equivalent. This logic used to be duplicated between the X11 and Wayland display servers, which is not ideal.