Pure Ruby message threading based on the algorithm described by JWZ in <https://www.jwz.org/doc/threading.html> and used in countless mail and news readers; but with some features removed and improved flexibility: