fix: stop hanging on cyclic exception __cause__ chains (#660)

retry_if_exception_cause_type walked __cause__ until None. Legal cycles
such as ``raise e from e`` (or mutual a<->b causes) never terminate, so
the predicate spins at 100% CPU and stop conditions never run.

Track seen exception ids while walking, matching stdlib traceback's
cycle-safe approach. Regression covers self-cause and two-node cycles.

Fixes #658.
2 files changed