cMIM: A Contrastive Mutual Information Framework for Unified Generative and Discriminative Representation Learning