Seeking Patterns, Not just Memorizing Procedures: Contrastive Learning for Solving Math Word Problems