guard/listen — pull request #198 by swistak (2014-03-01 16:20:47+00:00)
Title: Preventing finalization on dead actor

When using Calluloid.shutdown there's race condition between listeners
and celluloid which in some cases leads to Listener calling #finalize on
dead actor. Added a guard that checks if actor is alive when we're
exiting from #_wait_for_changes and calls finalizer only if it's alive.

PS. I couldn't for a life figure out how to make this test pass. I hate
mocking libraries with all my heart. Feel free to fix this.

Fixes #197