I think he's being picked on a bit because of his wee bit eccentricity
I would go to see the teacher again or even better the head teacher and voice your concerns and nip it in the bud.
We have been in to see our headteacher today as there have been some worrying goings on involving our DS with similar toilet door busting antics and egging him on to do stuff that he doesn't want to do. I feel so much better for having the chat with the head and knowing that our concerns have been taken seriously.
Our school also has a buddy system in place where the younger kids are buddied up with year 6 kid who they can go to for support if they are being unfairly treated and they have a bus stop bench where they can sit if there is no-one to play with and someone will come along.
but, on the other hand, DS has equally said no-one plays with him, but he has just meant that playtime, but to hear his rendition of it, it's all the time. We have asked at school though and he is always running around with someone. If he has had a bad day, it tends to colour his entire viewpoint of school.