A 17-year-old girl in India hanged herself after a friend posted intimate photographs of her on social media to take revenge.