Add vertex_attrib_array_get_attrib function to search attribs.

We can improve performance of this funcion for the usual use cases
in the next commits.
Check the overflow first thing when setting the attribs.
Some more misc style cleaning, and refactor.
Use the new get attrib function to refactor code in
GetVertexAttribPointerv.