Contrastive Representation Learning: A Framework and Review