A former Rutgers University student sent a message to a friend about wanting to “keep the gays away” and urged her to watch a feed from a webcam that he had trained on a bed where he expected his roommate to have a tryst with another man, according to text messages shown in court on Monday.