refactor formatters to reduce complexity

## DuplicateRemover 
- extract removers to there own methods
- remove current value (preserve later) so we don't need to check if the index was removed
- change tests to PHPUnit instead of PHPSpec

## RangeOptimizer
- extract operations to there own methods
- fix not fully optimizing connected ranges
- change tests to PHPUnit instead of PHPSpec