The Macroeconomics of Epidemics