Prevent potential Exception trying to render Batche with zero primitives

Original batch by 3xp0n3nt for 1.4. Now applied to Jogl RenderDevice
implementations as well.

Original commit comment:

Fix crashing bug in LwjglBatchRenderBackend. Don't attempt to render an
empty batch, i.e., if its vertex buffer is empty, because the render
method will attempt to access non-accessible elements, throwing some
nasty exception and crashing the program. This happens when the batch
pool reaches maximum capacity, causing it to double in size, i.e., from
2 to 4, and the problem is that in some cases it will only have enough
data for the 3rd batch, and the 4th batch will be completely empty.