Learning Distinguishable Trajectory Representation with Contrastive Loss