render: OpenGL renderer now caches some state, to improve non-batching mode. (other minor bug fixes in here, too)