Fix bug 816193: Correct locale in rev dash urls, PEP8 fixes

* Adds `locale=rev.document.locale` to compare_url and revert_url (fix for [bug 816193](https://bugzilla.mozilla.org/show_bug.cgi?id=816193)).
* Some PEP8 cleanup in views.py
* Fixes a deprecation warning in the test_main_view test (Django 1.3)