A joke (in this context) involves a set up and a punchline - the step from one to the other involves a twist of internal logic within the joke, which causes a surprise or shock - something different happens to what is expected.
The joke mechanism (again, in this context) is separate from the material; the material is the set up for the joke but not the joke itself, the double meaning is the joke.
As someone earlier quoted an example from the article, "coming round" has more than one meaning which you makes you assume one situation for the set up. When the punchline comes, you suddenly have to review your assumption of the situation.
The same joke would have worked with, "I was waiting for my mate to come round..." The surprise and shock is increased by using a situation of domestic violence. Same with rape: it's an extremely serious subject, so ramps up the shock factor. You might even say, the indignation of which this thread is an example, is actually what fuels these jokes.
Another example from the article:
"Some audiences say they don't like rape jokes. They say that, but I know what they mean."
The butt of the joke here is the rapist and their stupidity, it's ridiculing the defense of rape sometimes used and it's a social commentary on the justice system that allows it.