Domain Generalization for Mammographic Image Analysis with Contrastive Learning