QCRD: Quality-guided Contrastive Rationale Distillation for Large Language Models