I got the thing about Onan straight away (partly because I remembered a scene from
The League of Gentlemen where Harvey Denton gives a lecture about 'onanism' to his nephew Benjamin). For anyone else unclear, well, here's the scene from
The League of Gentlemen in the spoilers area, but be aware that the subject matter may be offensive.
Even so, I'm not sure why Solomon gave such a name for the poor dog. Seems like a rather cruel name, actually.