Ensure monitor is closed after task is resumed, fixes #121.

I tried using "ensure" block but it caused segfault. Not sure why. I only tested locally with 2.0.0 which had the bug. Perhaps you can suggest how to write a failing spec for this edge case.