support python 2.6

This needs a review, version bump and documentation update, but all tests pass in py26 and py27.