Where does the expression “as clean as a whistle” come from and What does it mean?

Robert Burns, in his poem, “Earnest Cry,” used toom (“empty”) rather than “clean”, “Paint Scotland greetan owre her thrissle; Her mutchkin stoup as toom’s a whissle”, and other writers have had the whistle clear, dry, pure, or other adjective.

The basic intent, however, is to indicate that, for a sweet, pure sound from a whistle or reed, the tube must be clean and dry.