verify if actor is dead before doing work

Also: stop stream when closing it.

Link: https://github.com/GeneAssembly/biosal/issues/150
Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>