Non-homogeneous markov chains: Tail idempotents, tail sigma-fields and basis