Triangle batches now work

However, the ray tracer is now slightly slower. The k-d tree builder needs to be
retuned.