Well the good I'm hearing here is that she isn't being mean or lashing out at this girl- she's holding it in which is why she cries when she gets home. Awesome that she seems sweet. That's also the bad, you don't want her upset!!
I remember my daughter in middle school coming home and doing a good job on homework- and when I told her she did great with math, she said "I should, I'm just in the dumb math class." There were so many kids who were in the advanced class that made the kids in regular/grade level math feel stupid. I was so mad!!
Those kind of kids will be around for years, I even know adults like this. :-) This is a great time to teach her that you can't change anyone else, you can just change your reaction. Here's what I would do:
-first make sure she hears that you understand how frustrating that is. "It must be so hard to sit through class/lunch and hear her go on and on." Your empathy will go a long way.
-teach her that she won't be able to change this girl, and any way of thinking "I'll be happy once she stops this" will only end in frustration.
-come up with ways to manage this. Some that just make your daughter feel better- maybe teach her to make a game of it. Tell her to count how many times this girl says the word 'smart' or the phrase 'I got an A' and that you'll give her one jelly bean for each time she counts. This will give a whole new spin to the conversation (make sure she knows not to tell anyone else what she's doing).
-Come up with ways to assert herself. Practice changing the subject politely "I'm so happy that you are Mrs. Smith's favorite student ever, that's great- did you guys see the Jessie finale last week?" Also practice what to say if this girl tells her she's wrong "that's my opinion, so it's just fine, thanks" or "I was just answering the question, it's not nice to talk to me like that." Find ways that are comfortable for your daughter, and role play them. The more practice she has, the more comfortable she will be saying them in the moment.
Really, the best thing you can do is to tell your daughter that you understand why it's so hard to sit with this girl. She won't change her, so finding ways to deal with her will serve her best. Even if/when she finds a new group, there is another annoying girl right around the corner. Good luck!