Partial Optimality via Iterative Pruning for the Potts Model