Move sharedSuffix and sharedPrefix methods.

Move sharedSuffix and sharedPrefix methods to ComparisonCompactor.