thorium: back off from the ring

An actor might send a lot of message in a single thorium_actor_receive()
call. For this reason, a worker needs to make sure that there is never too
many messages in the ring  to avoid memory exhaustion.

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>