Some Python 3 C-API fixes.
Fix memory corruption on Python 3.
Fix getattr on result object.
Fix segfault on Python 2.
Cleanup

Remove macros for Python <2.6
Remove more macros for ancient Python.
Merge branch 'py3-capi'