Fixed leak in sampler. Now commits to image buffer on a per-pixel level instead of per-sample level to avoid waiting for mutex lock. Added basic env sphere support for reflected and refracted rays (needs verification).