Remove workarounds for pre-2.6 Python

Here are some commits I made a while ago. I also added a new one to use 2.6’s exception handler target variables, which should avoid making reference cycles in Python 3.