Allow spawn() and friends to be used as context managers

Closes gh-111
Merge pull request #164 from takluyver/contextmanager

Allow spawn() and friends to be used as context managers