mesa: move _mesa_valid_to_render() to api_validate.c