2to3: Apply `sys_exc` fixes. Closes #3086.

This uses sys.exc_info in place of sys.exc_value. The new function
goes back to at least 2002, so should be safe.
Merge pull request #3097 from charris/2to3-sys_exc

2to3: Apply `sys_exc` fixes. Closes #3086.