The Macroeconomics of Structural Transformation