This issue is often addressed in the school rules, and school district philosophy often includes a statement about accepting each person without prejudice. But the critical piece is that the teacher sees the name calling for what it is (harassment) and addresses it accordingly.
Teachers should spend some time discussing diversity issues and helping students learn sensitivity and tolerance. In my particular school, the guidance counselor plays a role and comes to each class to teach these social skills, which I then try to reinforce on a daily basis. Discussions, role-playing, and guest speakers can help to raise students' awareness and prepare them for negotiating a world full of different kinds of people.
Secondly, if I knew that a student in my class was struggling with his or her sexual orientation, I would suggest that she meet with the school guidance counselor. My main concern would be that the student got the support she needed to work through what is all too often a lonely, painful and confusing process. Every classroom is a community of future adults, and we can change our society for the better by socializing students in an environment free of hatred, fear, and ignorance.