Sex determination and the generation of sexually dimorphic nervous systems