So to answer the question, I don't think there's anything specific moderators can do about rep-farmers. The rep-farmers are driven by points, and moderators are (should be?) much more focused on the quality of the site rather than on the points and badges game. The MathSE community as a whole can do something though. Our votes decide who gets reputation, and as Hurkyl suggests, we can all change our voting habits to give reputation to only and all things that improve the quality of the site, and downvote things that don't improve the quality of the site. Increasing the ratio of votes cast on a page (up or down) to page views would go quite a ways in steering the actions of rep-farmers towards site improvement. But this can only go so far (see the discussion in the comments).
Frankly though, I'm pessimistic about the voting habits of the MathSE community changing at all, let alone changing dramatically. I think the only effective way to improve things would be a dramatic changeoverhaul of the way reputation is awarded, byi.e. redefining set (1) to be closer to set (2). But I can't imagine StackExchange ever doing such a thing; it would cause quite the uproar, but. But here are a few ideas (some good, certainly some bad, none of which I've put serious thought into) of what I mean:
As pointed out in another answer, reputation should be awarded for putting in the work of marking questions as duplicates. This action obviously improves the quality of the site, and should be rewarded.
Make the number of points awarded for an answer proportional to the quality of the question. If someone answers a question with a score of -1, they certainly aren't adding as much quality to the site as answering a good (hard) question with a higher score would. The Reversal Badge never made much sense to me either.
Consider awarding points for other housekeeping activities, like closing/deleting/merging questions. The cap on how much reputation a user can earn by editing questions doesn't make much sense to me. Responding to some of Xander's comments below, instead of giving editors a flat +2, we could give editors a cut of any of the future reputation a question/answer earns. If their edit is unsubstantial, then (ideally) a question will get no more upvotes than it already had, and the editor gets no points.
Award reputation for voting. Something small like getting +1 reputation per vote. The fact that it costs 1 reputation to downvote an answer doesn't make sense. (This idea could be easily abused though ...)