simplified SceneCache::WriterImplementation::accumulateBoxSamples, added some unit tests