Fix broken unit tests

As per subject line - the unit tests had been broken by recent versions of django/django-cms, so I've got them working again.
At the same time I tidied up some of the source code to be a bit more PEP8 in style, and also removed a couple of single-letter variable names as these made it really hard to run cms-redirects through the Python debugger.