Cleanup: Move create_local_tm() to pootle.core.initdb

This way we:

* Consolidate code on pootle.core,
* Keep a cleaner code on the upgrade module,
* Keep all the DB initialization code in one place.
Return JSON when the error happened in an XHR context
Set maximum required Django version to 1.6

Code is not yet fully adapted to Django 1.6, mainly because of some third
party apps, some of them which are still in our codebase, e.g. djblets.
Expand makefile help with assets rebuild command
Adjust defaults to newer DDT versions
Add missing import
Cleanup: Use styleguide conventions on Goal fields declaration
Goals: Flush stats caches only in current translation project

Removing the cache in all the translation projects in the same project when
saving a translation was taking too much time.

Partially amends commit cc0ed4b4. Performance fixes in the next two commits.
Goals: Refactor out the code for getting the trail to a given path
Goals: More efficient cache flush for a given path

Now all the affected objects are retrieved before handling them. This avoids
retrieving the objects, for example the directories, several times thus
querying the database several times for the same object.
Docstring improvement: include example and rephrase
Cleanup: Only import if necessary
Whitespace cleanup
Removed unused import
Avoid naming clash
Cleanups
Cleanup: removed unused script
Blank lines cleanups