make vertex buffers behave like std::vector (in the sense that shrinking does not reallocate) and other minor tweaks