More work on contour handling.

Split out the drawing into a separate method.  The contour finder now
just returns the largest contour found.
Probably should have committed more today.

There were too many changes to summarize cleanly in this commit.
Started work on the analysis command line app.