Fixes buffer overflow and attribute cache

-Previously if you rendered more sprites than the ring buffer could hold
(like 100k), you ended up with corruption. Now it will resize the buffer
in that case.
-Attributes are bound per GL_ARRAY_BUFFER, while I hold it one
per-shader. Later it will have to be changed, but for now I save the
bound VBO with the attribute, so I can rebind it if needed. This fixes
attribute caching.

TODO:
1) Fix Linux.
2) Fix problems with rendering basic 3D geometry. It seems the Z
coordinate is not used when drawing in stream buffer.