mesa: main: add GLES internal format override

GLES has no direct way to specify internal format, so we
want to determine the best fit based on format and type and
override the preferred internal format.

This is allowed according to the spec as long as no
specific internal format is provided using extension
OES_required_internalformat. This extension is not
implemented by mesa, though.