BUGFIX: maximum recursion depth exceeded
BUGFIX: maximum recursion depth exceeded

The "maximum recursion depth" error was a function of the number of
email messages since the has_descendant method was recursive, which led
to a growing call stack. Now, it works iteratively by using depth-first
search.

akuchling/jwzthreading,cagomezt/jwzthreading