st/mesa: decrease overhead of st_update_arrays using C++ templates
The last 4 commits decrease overhead. The last commit is the most impactful one, like struct tc_set_vertex_buffers
is filled by st/mesa directly. The rest are prerequisites and cleanups.