Improved Iterative Computation of the Expected Discounted Return in Markov and Semi-Markov Chains