Relation Extraction with Weighted Contrastive Pre-training on Distant Supervision