Fix a NameError in the LocalizationTag implementation.
Refactored search view to be API based and implemented complex filters.

This also includes other fixes:

- added django-dbgettext as a simple way to handle dynamic translations
  via the standard gettext API

- a fix for calculate_related_documents the cronjob function to
  actually use the correct table for document tags
Merge branch 'master' into extend-topic-filter-915760

Conflicts:
	apps/search/templates/search/results-redesign.html
	apps/search/views.py
	apps/wiki/models.py
	templates/base.html