Inductive Relation Prediction with Logical Reasoning Using Contrastive Representations