Check if Wayland buffer is an EGLStream before checking if it is an EGLImage
Currently, it is assumed that if querying the EGL_TEXTURE_FORMAT of a Wayland buffer succeeds it is an EGLImage. However, this assumption will no longer hold on upcoming versions of the NVIDIA EGL Wayland driver which will include support for querying this attribute for EGLStream buffers as well. Hence, we need to check if buffers are EGLStreams first.
Fixes #488 (closed)