Fix teardown all to support teardowns that trigger other teardowns.
Fixes based on @necolas feedback.
Make style more consistent.
Merge pull request #194 from phuu/fix-teardown-all

Fix teardown all to support teardowns that trigger other teardowns.