Fix packaging issues with thor

The pull request fixes various packaging issues with thor that make it installable with setuptools/pip/whatever and provide a proper top-level package name for the library (I think others are using git submodules and explicitly cloning the source into a directory called 'thor').

Note that the name 'thor' is already taken on PyPi. In future it might make sense to change the package name, but the library can at least now be identified under the name 'potato-thor'.

Tests all pass when installed as a Django app.