A core genome approach that enables prospective and dynamic monitoring of infectious outbreaks