Resampled Mutual Information for Clustering and Community Detection