Electron transfer and energy transfer in the quenching of triplet states by inorganic ions