Martingale limit theorem and its application to an ergodic controlled Markov chain