I suspect the origins for all of these (and this style of humour) are found in Lunnon English.

Could be so, but the only usage of "blue" that I am aware of is C19 thieves cant for lead (ve metal, not wot yer puts rahnd ve neck of yer dawg!)