Neoclassical growth with endogenous age distribution. Poverty vs low-fertility traps as steady states of demographic transitions