Duration of agriculture and distance from the steppe predict the evolution of large-scale human societies in Afro-Eurasia