Modern mathematical tools reveal the conditions pathogens needed to remain active in a ship’s population for the duration of a historical journey