TST: General label type tests for confusion matrix

More generalized and refactored tests for general label types in `confusion_matrix`
Also factored out the `matthew_corrcoef` from `confusion_matrix`.