ReportUnit: moved getComparatorV2 inner class to separate class

ReportUnit:
- Moved the getComparatorV2 inner class to the separate ReportUnitComparator class.
- Fixed some Checkstyle issues in the getComparator method.

ReportUnitComparator:
- Created as a new class (from the ReportUnit.getComparatorV2 inner class).