Ecosystem consequences of a nitrogen-fixing proto-organelle