I've got a possible interpretation, for which however, I'm afraid there is actually little hard evidence (but considering the scarcity of etymology studies dealing with prostitution professional vocabulary, this is hardly surprising). However if you connect the dots, it kind of makes sense.
For each dot, in the conjecture below, I will add a confidence level (abbreviated as CL), so that hopefully other contributors might fill the gaps.
Here it goes anyway:
It all comes from... Surprise, surprise.... French argot (slung).
- "trique" in popular French is a word
for a wooden stick (CL 100%).
French donkey's are sometimes
motivated using "des coups de
trique". It is believed to come
from Northern French dialectal
"estrique" and is akin to "strike" in
English, "streik" in German and so
on. Also gives "tricoter" (to knit) in French.
- "avoir la trique" or "triquer" means
to have an erection (CL 100%).
Passing the boundary between popular
and argotic here.
- By extension "triquer" or "trequer"
means, for a man to make love, in a
careless/bestial way to his partner.
(CL 100%). Please refer to a
famous novel named "Prostitution"
by Pierre Guyotat, easy to find on
the web. Just Google for "Guyotat
triquer" and you should net a large
number of hits.
- The verb "triquer" used as "to have sex
with a prostitute" was particularly
common in the world of French
prostitution in the previous century
at least (CL 50%). Can't back this
from personal experience, I'm afraid
;-).
- The idiomatic expression passes in the English language somehow (CL 20%).
- A trick in English in the context of
prostitution has both the meaning of
a customer or the act itself. (CL 100%).
- To "turn tricks" is to engage in acts of prostitution with "Johns" or "Tricks".
So you see, this is a possibility but there are a few gaps which I'm not able to fill with certainty.
Edit
Since this post was composed (more than one year ago) and as I researched the world of the French Impressionists, I came across additional info concerning the step in which the expression passes into English.
It is a well documented fact that the French industrial revolution was accompanied as everywhere else, by rural exodus, poverty, and an increase in the levels of urban prostitution. It is also possible to show that a proportion of French prostitutes emigrated to the US and various other destinations (even Australia) at that time (end of the 19th Century). Conversely, one can find examples of "petits femmes de Paris" having risen to a certain level of fame and wealth in the US at the time.
In summary, the possibility that the expression passes into English now seems less conjectural to me.
Best Answer
"Around the Horn" has always referred to Cape Horn, but it's only since the existence of the Panama Canal that it has been "the longer way". With modern ships it's not the danger it was in the days of sail, but it would still be a very expensive detour in many cases.