Optimizations to BVH2 and BVH4, and a bug fix for BVH4.

The bug in BVH4 was causing it to traverse some nodes that hadn't been
hit, which resulted in a notable speed reduction.  The renders were still
correct, but it was doing needless work.