gl-renderer: Fix possible memory leak when no dmabuf modifers are supported

Some drivers support EGL_EXT_image_dma_buf_import_modifiers for format
enumeration, but don't have any modifiers. In this case, on platforms where
malloc(0) returns non-NULL, we would leak that allocation to the caller.

Handle this by noticing when the number of supported modifiers is 0 and
returning early.
2 jobs for permissive-query-dmabuf-modifiers in 1 minute and 53 seconds (queued for 7 seconds)
Status Job ID Name Coverage
  Container Prep
passed #683958
container_prep

00:00:32

 
  Build
passed #683959
build-native-meson

00:01:20