Python 2.5 doctest

This is a start to getting the doctest runner to work with `with` statements in Python 2.5.  For some reason, the fix works in assume.py but not in pytest.py.  There are also skipped with statement doctests in mpmath, but I didn't change those.