Contrastive Learning of Temporal Distinctiveness for Survival Analysis in Electronic Health Records