Sexual dimorphism as a facilitator of worker caste evolution in ants