tox test environment and Python 2.6 support

This PR adds a tox.ini config file set up to test against Python 2.6 and 2.7 with both postgres and sqlite, and fixes the remaining failure spots on Python 2.6 as outlined in #156.