A judge handed down a 15-month prison sentence to a Massachusetts woman who sent a barrage of text messages that led to her boyfriend’s suicide.