Kingship and warfare may have originated as survival strategies