Contrastive Time Series Forecasting with Anomalies