But doesn't that sort of thing happen mostly out of earshot of teachers or parents, anyway? Most instances of name-calling I remember from school happened at recess, or in the hallway, or on the way home from school, and no one wants to be a "tattletale," so you don't usually say anything about it. The one school incident so far that our son was bothered enough to tell us about (it didn't involve him personally) happened on the bus, and at a low enough volume that the bus driver couldn't hear. I think that's usually the way it is.
Anyhow, I think preparing kids to handle this sort of thing is above all a job for parents, because the skills needed for that are best learned through one-on-one interaction, where you're engaging the child directly. My own parents tended to emphasize not doing it yourself, rather than how to respond when others do it, and generally they did that by appealing to put-yourself-in-the-taunted-child's-shoes kind of thinking. I think that's a lot more effective than presenting it as "These words are unacceptable," because the "words-hurt" principle immediately rings true to kids as something known from experience, and appeals to their desire to influence others through their own behavior, whereas "It's unacceptable"--well, they only have to look around to see that lots of kids think it's perfectly acceptable, at least so long as an adult's not around, so they may very well draw the (wrong) conclusion in that case that different codes are called for when interacting with peers vs. adults. As far as handling it when other kids do it to them (or others) though, yeah, of course you want them to understand they should talk to an adult when it makes them angry or scared or upset, but they also have to come to terms with the fact that there are mean people out there, and they may think this makes them look tough and clever and in control, but they only think that because they're none of those things, and eventually they'll realize this as they get older and find out that big kids and grown-ups don't respect people who act that way...so, you treat mean kids with good manners just like you'd want to be treated, and you never forget they're mostly-good people with feelings just like you (and they might even change their minds if you do that), but at the same time--no one is forcing you to look up to them, or to think what they're doing is OK, because it's not.
I do agree that some kinds of insults are more hurtful than others, if only because they're more frightening and alienating, but I think basically the response called for is the same. Parents and teachers can and should talk about how people come in different colors and how there are different kinds of families and this is a normal and beautiful part of the world, etc.--that does help, and it enables them to grasp and describe their world better--but it really won't add up to much if the fundamental recognition of how name-calling hurts people isn't there; ideologies about race, sexuality, and so on are abstractions at best to an 8-year-old, and it's a bit much to expect them to connect what relatively little they do grasp of them to the implications of their own behavior. The Golden Rule, though, that they can understand.
I'm also wondering how many kids under about 10 or so really understand what "gay" means--our oldest son has some idea, and I know from talking to their parents that some of his friends do too, but I'd imagine a lot of kids that age don't understand why it suggests the qualities it does. When I was in grade school--though of course, this was 25 years ago--I knew it meant "foolish", "frivolous", etc., but I really had no idea why it meant that, and most other kids I knew didn't seem to either. Of course you can explain the connection to them, and we've done that with our son, but I wonder how many parents actually do. Whereas an insult like "retard," even very young kids clearly understand the reference there, because they'll often, e.g., imitate the facial expressions of someone with Down's Syndrome when saying it.