refactor ValuesToRange to remove internal state remembering

- change tests to PHPUnit instead of PHPSpec
- use closure for comparison (should be GC so no problem with memory)