pootle_store/models.py: Fix getcompletestats() exception branch

fix "NameError: global name 'e' is not defined" bug when this exception
happens.
Bugfix: Make optional the filename in get_resource_context decorator
Fix previous bugfix

Previous bugfix didn't work for TP root URLs.
Restore get_absolute_url() for Directory

This is necessary since the trail templatetag fails in some cases due to
lack of this method on Directory objects.
Bugfix for bugfix for bugfix
Use permission_required decorator

This decorator was introduced in global search branch, using it for the
tagging code for consistency.
Cleanup: remove unused includes
Add *.db-journal to gitignore
Cleanups: Use @require_POST instead of manually checking
Tagging: Cleanup sorting filtered table

Should work much better now, instead of hiding the unfiltered table, we
now detach it completely so that there is no id clash.
Tagging: Fix applying stored table order

When switching back to the unfiltered table, we want to fire the click
event only when the new order is different than the existing one.
Tagging: fix deleting existing tags

Deleting was working only after adding a new tag.
Tagging: toggle filtering

Add an icon to toggle tag filtering widget.

Fixes bug 3077.
Tagging: reset the filter when hiding the widget

When hiding the filter widget the filtering is reset, and when
showing it again the filtering is restored back.
Docs: Initial documentation for tags

Closes bug 3091
Docs: Add tagging support to changelog
Docs: document taggit special migration needs

Fixes bug 3078.
Docs: Update docs for Fabric deployment method
Fix: Make /projects/ page work again

The @permission_required was not working since no path_obj was passed.
Cleanups