broke out stats functions from ConfusionTable
generalized mean_pairwise_similarity to take any mean function
adjusted tests slightly, as necessary