Optimal Economic Development and Endogenous Population Growth