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`.

Add-on to https://github.com/scikit-learn/scikit-learn/pull/1911.