Add tox/testr configuration

This change adds tox and testr configuration.

And it also fixes all the unit tests.

Now the test suite can be run with:

$ tox -epy27