Origin of resolution enhancement by co-doping of scintillators: Insight from electronic structure calculations