Nonproportional scintillation response of NaI:Tl to low energy x-ray photons and electrons