The evolution of the flagellar assembly pathway in endosymbiotic bacterial genomes.