Evolutionary dynamics of intergenic sites, pan-genomes, and introgression in bacteria