Ergodicity in parametric nonstationary Markov chains: An application to simulated annealing methods