Better testing

I've done:

- minor refactors at tests
- made web server starts only once (tests should run a lot faster due to lack of so many system calls)
- added tox config with Python 2.6/2.7 entries