mesa: Returns a GL_INVALID_VALUE error on several glGet* APIs when max length is negative

The manual page for glGetAttachedShaders, glGetShaderSource, glGetActiveUniform and
glGetActiveUniform state that a GL_INVALID_VALUE is returned if the maximum length
argument is less than zero. For reference, see:
https://www.opengl.org/sdk/docs/man3/xhtml/glGetAttachedShaders.xml,
https://www.khronos.org/opengles/sdk/docs/man31/html/glGetAttachedShaders.xhtml,
https://www.opengl.org/sdk/docs/man3/xhtml/glGetShaderSource.xml,
https://www.khronos.org/opengles/sdk/docs/man31/html/glGetShaderSource.xhtml,
https://www.opengl.org/sdk/docs/man3/xhtml/glGetActiveUniform.xml,
https://www.khronos.org/opengles/sdk/docs/man31/html/glGetActiveUniform.xhtml,
https://www.opengl.org/sdk/docs/man3/xhtml/glGetActiveAttrib.xml,
https://www.khronos.org/opengles/sdk/docs/man31/html/glGetActiveAttrib.xhtml.

This fixes 4 dEQP test:
* dEQP-GLES3.functional.negative_api.state.get_attached_shaders
* dEQP-GLES3.functional.negative_api.state.get_shader_source
* dEQP-GLES3.functional.negative_api.state.get_active_uniform
* dEQP-GLES3.functional.negative_api.state.get_active_attrib