It is a very difficult situation you're in and I think I'am more of Lil's view. One of my friends kept in touch with her ex-partner and they were 'considered' to be friends. But her ex would make suggestive comments when his partner was not around to my friend and most of all, my friend loved it. Even though their relationship had ended, my friend loved the fact that she was 'unattainable and desired' by him and it would make her day.
If it bothers you that much, I would personally ask him for clarification. I would say that this is the LAST time I am going to ask you, but to please consider my feelings (as some of the other posters have said) but where do I stand with you? - If he answers quite convincingly that he IS with you and you matter the most, in whatever words, then you have to accept the relationship as it is.
But you are in stronger position to tell him that you can deal with the social gatherings but are not comfortable with her contacting you through facebook and the rest of it. Then it is his decision and responsibility in controlling his relationship with his ex, however that relationship is now or in the future.
I don't know whether I am giving you good advice, everybody is different. But there is a variety of opinions on here to draw from.