AV::Digestor thread safety fixes.

This fixes potential thread safety issues introduced in 09f6fe1. The problem
with the original code was that the "recursion-stopping" `nil` values could
be seen by other threads.
Merge pull request #11664 from thedarkone/digestor-thread-safety

AV::Digestor thread safety fixes