Hey guys, sorry to report I had a pretty bad day today

So I have this "friend", we hang out sometimes and chat and stuff, but today he's REALLY made me angry.
Me and him know one of our friend's housemates, who happens to be a girl a couple of years younger than us (she's 22) who I quite like and have been chatting with a fair bit.
So today the three of us were chatting on facebook (facebook drama eh? happens all the time

) and out of the blue he says (WARNING: this is pretty graphic) "So James, creampie or bukakke?", literally out of NOWHERE! He does this all the time, too! His idea of humour is just coming out with really overtly sexual and graphic stuff, I swear he's some kind of pervert! So he comes out with that in the middle of a conversation with this girl, who goes silent immediately, and I am just beyond humiliated and immediately tell him to back off since we hardly know this girl and I don't even find that question funny! Don't get me wrong, I love a dirty joke, but that's not even a joke! And we're in a conversation with a girl we barely know! He responds by saying he could describe much worse and then goes on a tirade about how I'm uptight and that what he said isn't rude constantly asking this poor girl if she's offended then laying into me for "being offended for her". So I tell him he's being an embarrassment and he just gets more and more defensive and saying really graphic and sexual stuff like we're supposed to find it funny! I had to start another chat window with this girl to apologise and tell her how embarrassed I was, and she just kinda laughed it off and said don't worry, then went silent.
So I'm left talking to this guy who sees nothing wrong with what he said and acts like I've done something wrong to HIM!
I'm fairly sure he's put this girl off the both of us and made us both look like idiots because he has no idea about what's appropriate to say in a conversation!
Like I said, he does this ALL THE TIME too! Every single thing he says is a sex reference, which is even worse because (and I don't normally make comments on people's appearance) he's HUGE AND GROSS! He never washes, he's grossly overweight and smells terrible! I don't mind if someone's overweight, or even obese, as long as they make an effort to present themselves well and keep clean etc. but this guy doesn't even TRY! He's like some lecherous slob who has an obsession with sex and a temper shorter than a fricking matchstick. I swear I wouldn't be surprised if he turned up on a sex offender's register! I'm not even joking, or saying that to be spiteful, he SERIOUSLY worries me.
I want to apologise for making comments about his appearance, that's never fair, but I hope you understand what I'm trying to get across.
Despite all this, for some reason, he has a fairly big circle of friends! Bigger than the circle I have. However, they're mostly girls, and they nearly all have terribly low self esteem, including his girlfriend, who's a freaking VET, yet thinks he's the best she can do!
I just can't take this guy any more! He's vile! He's rude and obscene and lecherous and yet always makes me feel bad if I call him out on it, like I should feel sorry for him for some reason!
I want to get him out of my life, but I don't know how to get rid of him! So many of my friends are friends with him too, so it's not like I can avoid him! I feel embarrassed being around him, not for the way he looks (even though he doesn't make any effort, constantly has food stains down his front, but I can forgive someone for that), but for how truly gross his personality is!
To top it off, he's INCREDIBLY dense to the point where it's amazing. I'm not going to give examples as that isn't fair and I don't want to give examples that other people might read and feel bad themselves if they don't know something. But trust me, he's supremely stupid.
What can I do? I can't take this guy, I need better friends who are just normal and talk about normal stuff and do normal things and are positive and help me feel positive while I help them feel positive, isn't that what friends do? A lot of my friends can't stand him either, but I feel like I'm stuck with him because I don't have the guts to just tell him he's embarrassed me for the last time and I frankly don't like him.
I just think I was brought up to be a nice guy, and to have good manners, especially when it comes to girls, and being around someone like him who is that rude and ignorant and frankly disgusting just makes me feel bad about myself.
What can I do?