Single photons from a trapped-ion cavity-QED system