Ants, You are partly right. In physics modelling, we like to fix one variable, and vary another to see what happend. If you fix leg length, then you shpould use a crank length based on your musculature(fast/slow ie cadence rate). If you are a spinner, go for a shorter one, mashers prefer longer ones.
If you fix the musculature type, and vary leg length, then longer legs need longer cranks.
Of course longer legged people often have slower moving legs.
For any leg length there is a medium crank, you can then vary about this medium according to your preferance for long/slow or short/fast.
If you are very short, your medium crank may be 160mm, if you are very tall it may be 180mm.
Crank length (eg http://www.coloradocyclist.com/bikefit/
) advice tends to advise variation with leg size with the medium leg lengths (ie from 165 to 175mm), but no variation above and below the "normal" size range. I detect a flaw here.