Almost three in five teachers believe social media use has had a negative effect on behaviour in schools, according to a union poll.