Fine-grained Contrastive Learning for Relation Extraction