Fork doctest from Python 2.7.8
Compare expected and actual with eval if possible

If the last statement of the doctest is an expression and the
expected result can be `eval`ed in the doctest's context use `==`
to compare the values, and fallback to the old string comparison
behavior if not.

This allows doctests to verify sets and dicts without having to
resort to workarounds like expecting `True` or using `sorted`.