The origin and evolution of metabolic pathways: a common origin of nif and bch genes