!UPSTREAM: main: Allow ctx == NULL in _mesa_validate_shader_target().

This will allow this function to be used in circumstances where there
is no context available, such as when building built-in GLSL
functions.