Group leadership depends on energetic state in a nomadic collective foraging caterpillar