Maximizing Supermodular Functions on Product Lattices, with Application to Maximum Constraint Satisfaction