Constrained Clustering: General Pairwise and Cardinality Constraints