The dual role of pyruvate and the energy requirement in nitrogen fixation