Electron-ion recombination and photoionization of Fe XXI