The history and economics of pandemics