What does "soup to nuts" mean?

An editor asked about "soup to nuts," which appeared in this story. It means from beginning to end or the whole shebang, of course, but then we wondered where the phrase comes from.

This article was originally posted by the Raleigh News & Observer, a subsidiary of The McClatchy Co.; is posted here to provide continuity; and is copyright © 2011 The News & Observer Publishing Company, which reserves the right to remove this post.