Time-Series Contrastive Learning against False Negatives and Class Imbalance