Improving the Robustness of Knowledge-Grounded Dialogue via Contrastive Learning