Fix testing

Hi!

You may not have noticed, but the Makefile inhibit the Travis virtualenv and the tests always run on Python 2.7.
As a consequence, Python 2.6 and 3.X support was broken.

This pull-request unhide these test failures and errors for Python 2.6 and Python 3.X and fix those.

I added a tox file to allow developpers to test against all Python versions on their own computer.

I also used the json module provided by Flask to ensure JSON serialization is the same every where (and to gain from their tuning).