Use PyCapsule for py3.1, fixes #237
Merge pull request #238 from wiredfool/pycapsule

Use PyCapsule for py3.1, fixes #237