Concentration inequalities on product spaces with applications to Markov processes