Mitigating the Learning Bias towards Repetition by Self-Contrastive Training for Open-Ended Generation