Monte Carlo Tree Search Boosts Reasoning via Iterative Preference Learning