Understanding the Gains from Repeated Self-Distillation