fixed major bug in adaptive image plane sampler.

- the samples need to be scaled to account for the varying density of samples per pixels.
- moved variation tracker into its own file and added a test.
- simplified code.