mesa: move _mesa_error_check_format_and_type() to glformats.c