Towards a Holistic Understanding of Mathematical Questions with Contrastive Pre-training