Added algorithm to count the number of inversions in an array
minor refactorings regarding the sorting classes