st/dri: simplify dri_get_egl_image by reusing dri2_format_table

this makes dri2_get_mapping_by_fourcc accessible from dri_helpers.h
and does a direct lookup on the fourcc id to match the pipe format

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 jobs for !972 with yuvplanes in 32 minutes and 48 seconds (queued for 23 seconds)
latest detached
Status Job ID Name Coverage
  Containers Build
passed #462092
debian

00:00:22

 
  Build+Test
passed #462101
meson-arm64

00:04:51

passed #462100
meson-armhf

00:03:26

passed #462094
meson-clang

00:08:59

passed #462098
meson-clover

00:13:16

passed #462102
meson-i386

00:03:07

passed #462097
meson-main

00:05:05

passed #462093
meson-swr-glvnd

00:07:16

passed #462099
meson-vulkan

00:02:31

passed #462104
scons-llvm

00:04:23

passed #462103
scons-nollvm

00:04:37

passed #462095
scons-swr

00:07:12

passed #462096
scons-win64

00:09:02