My own view on this is that, for the most part, the metaphor doesn't work well at all. The problem with it is that it does not account for the fact that mutants have among their number fantastically powerful and dangerous beings. Putting aside for the moment the question of how numerous such dangerous mutants are, the reality of power completely changes the dynamic and the conversation. In the real world, most discriminated against and abused minorities don't have that much power. (There are a few cases where they do, but it is rare). They are, fairly consistently, the victims of others. With mutants, the reality that a single angry mutant could, potentially, destroy cities and kill millions of people is a factor that simply can't be wished away or separated from the question of how ordinary humans react to mutants.
This problem is particularly apparent in the X-Men movies, especially "First Class." In that film, a cabal of mutants literally manipulates the superpowers into a confrontation that almost ends in a hoped-for nuclear war that will kill the humans and create the conditions for more mutants. After that experience, Magneto's going on about how he hates and fears humans becomes almost unimaginably narcissistic. If he can't even perceive why humans' fears of (at least some) mutants are not justified, then he is not paying attention. This issue of powerful mutants pushing the entire world to the brink of destruction seems to come out even more strongly in the new movie, if the trailers are any indication.
My point here is not that all mutants should be discriminated against or treated as dangerous. It is, however, that the reality of mutant power makes the use of mutants as an analogy to almost any real-world group very difficult to sustain. The fact that some mutants can and have tried to destroy the world means that it is not unreasonable to treat all mutants - or at least those of a particular power level - as potential threats and to develop laws and rules around the use of their powers. This is not unreasonable and, indeed, quite logical.
I think that the X-Men metaphor could delve into these much more sophisticated interpretations of how ordinary humans co-exist with those they fear and the relationship of power to the powerless, but it would greatly complicate and even undermine the "minority discrimination" metaphor.
I think that the upcoming "Batman vs. Superman" movie actually touches on some of these issues, judging from the trailers and clips. From what we can tell, Batman decides that Superman is too dangerous to be allowed to run free - maybe even to live. He bases his conclusion on the fact that Superman has already fought one battle that has killed thousands and that he could destroy the entire human race if he wanted to do so. We know that Batman's reaction is based on fear and hate and he will, undoubtedly, come to realize that Superman can be trusted not to abuse his power. But, on the other hand, the fear is justified and understandable, based on actual events. I think that DC comics has dealt with this issue in a number of storylines that have placed the fear of normal humans of their superhuman protectors at the center. I think that this kind of approach makes more sense than the X-Men analogy.
I'm trying to think of a real-world example where the X-Men analogy works and the best I can come up with is the treatment of Muslims in the West after 9-11. The argument that a group of Muslims did commit a terrible act that killed thousands and that they should all, therefore, be mistrusted and treated as "enemies" comes close. The idea that a Muslim terrorist might do something similar in the future and that this justifies continued discrimination makes sense to some people. However, the reality is that most Muslim people are harmless and, of course, most lack the capability or intent to kill thousands of people. Even so, these are possibilities that can be guarded against by increased vigilance, limited security changes, etc. (I'm not going to get into the reality of the tens of thousands of Muslims the West has killed in retaliation, though it is not entirely irrelevant - Magneto, after all, is a terrorist who conducts his war as a retaliation and preemptive attack on those he sees as his oppressors). If most Muslims possessed genuinely dangerous abilities, the extent of what "reasonable response" would require would change. That is closer to the reality of mutants (and other superhuman beings) in the Marvel Universe.
So, in my view, while the analogy is interesting, it doesn't work that well. It requires ignoring or leaving out all of the overwhelming evidence that mutants (some/most) can be incredibly dangerous to ordinary humans (and each other).