Refactored NCA and kNN into generic MahalanobisKNN, and updated ConfusionMatrix and ContingencyStats