Allocate textures names in blocks.

May improve performance slightly when loading or recycling textures.
Probably uploading the texture is bigger anyway.
Allocate vertexcache buffer names in chunks.

Partially implements #6045.
Reuse buffer objects when possible.

glBufferData() recreates anyway.
Don't allow the buf name cache to get too full.
Merge pull request #6252 from unknownbrackets/gpu-minor

Allocate tex and buffer names in chunks