Electron guns using thermionic emission of cathode heated by electron or ion bombardment or by irradiation by other energetic beams