Make Contexts context managers

Based on #573, for convenience. Closes #558.