Relating Ecological Diversity to Genetic Discontinuity across Bacterial Species