Towards an ecosystem model of infectious disease