The best thing you can teach your daughter, is that no matter what mean thing one person says to another, the person with the problem is the one saying something mean. Not who they are saying it about. No matter what the thing is.
My daughter (5) knows (well I'm teaching her, it's human nature to feel hurt) that if someone says something mean, it only shows that they are a mean person, nothing more. Her little sister (18 months) has a big birthmark on her face, and she has heard other kids say insensitive things about it at the park etc. I have told her, "They said something rude, that's not polite, but it doesn't hurt us. We know our girl is beautiful right? You can tell them they are being mean, but don't let them make you feel bad. Just go find some nicer kids" type stuff.
So far, no one has said mean stuff to her, but it hurts her when they say it about her sister, which I'm teaching her to deal with. As for herself, when it's her turn to get picked on, I'll remind her (I've told her before when we talk about bullies) her that those types of kids have always been around and will always be around, and they are the ones with a problem if they're saying mean things. They have bad parents and they don't know better etc.
Also, it sounds like the comment the girl at the sleepover made was parroted from a catty mom who gossips. Or a TV show, or other shoddy environmental stuff she's heard. I wouldn't get so entirely furious about it, just tell your daughter the girl said something rude, and that's not the last rude things she's going to hear in her life, so get used to letting it roll off a duck's back. She doesn't have to be friends with the girl, but she shouldn't let it upset her. Don't give her the impression that a dumb comment about something as superficial as chunky legs has the power to totally destroy people.
I'd probably sit with my daughter and think of some good child appropriate come backs for that, or at least tell her to tell the girl that it was a mean thing to say, and not to say it again, or she won' be her friend. Or if she already doesn't want to be friends, I'd tell her to tell the friend why. Who knows, maybe she'll apologize. I'd give her some practice for standing up to these types. Tell her, "Next time say something like, 'I may have chunky legs, but you'll never have any friends because you're mean '" or something.
My daughter's favorite come back now when she hears people comment on her sister's birthmark with things like, "Hey, she has something on her face!" or something is "WOW, what great EYES you have" in a super sarcastic tone we rehearsed. The parents are always super embarrassed and impressed. I tell them it's fine, kids say crazy things. My daughter needs to know rude comments don't have the power to make me mad.