On the Poisson equation and optimal stopping of ergodic Markov processes