According to The Oxford English Dictionary, the origin is unknown. However, it points out that one etymologist suggested it might have come from a gypsy word, 'loke', meaning a man. Obviously, the editors of the dictionary were not sufficiently convinced. Chambers DIctionary takes the same view, so I would be wary of any suggestion that the origin is clear.
It came from a bloke who used to live just the other side of the black stump in Australia many many moons ago......
Pretty safe bet he's gone by now... the poor bloke......