mesa: add glProgramUniform*() entrypoints

These are part of both GL_EXT_direct_state_access
and OpenGL 4.1 / GL_ARB_separate_shader_objects.
mesa: remove duplicate code in GetBufferParameteriv

It is exactly the same as GetBufferParameteri64v, aside
from the size of the integer variable, so just use a cast.
mesa: split out buffer object lookup
mesa: split out switch statement
mesa: factor out switch statement
mesa: split out buffer lookup in MapBuffer
mesa: split out buffer lookup in UnmapBuffer
mesa: split out buffer lookup in GetBufferParameteri64v
mesa: split out buffer lookup in GetBufferPointerv
mesa: split out buffer lookup in FlushMappedBufferRange
mesa: split out buffer lookup in MapBufferRange
mesa: split out buffer lookup in BufferSubData
mesa: split out buffer lookup in CopyBufferSubData
mesa: split out buffer lookup in BufferData

It still requires the target parameter, however, to pass
on to the driver callback as an optimization hint for
how to allocate the buffer's backing storage.
mesa: split out buffer lookup in GetBufferSubData
mesa: remove 'target' param from Driver.NewBufferObject

Absolutely nothing used this.
mesa: drop unused 'target' param
mesa: more accurate error messages

Don't hardcode the function name, since this is reused for
other entrypoints.
mesa: implement glNamedBufferDataEXT entrypoint

Note that the Driver.BufferData hook takes a 'target' parameter
as an optimization hint of how to allocate the buffer. Drivers
seem to be able to handle passing an invalid target of '0',
as done here, by falling back to a default.

Since it's merely an optimization hint, as any buffer could be
bound to many different targets, regardless of what target it
was bound to when its storage was first specified, drivers
in general shouldn't keel over because of this regardless.
mesa: implement glNamedBufferSubDataEXT entrypoint