It's a reference to the lower part of the human leg called the shank, nowadays known as the shin. Hence, shanks' pony (it should have the plural apostrophe) is walking. It has nothing to do with the Shanks lawnmower company, as the expression predates this by centuries. Indeed, King Edward the first of England was a tall man and was known as Longshanks.