Upgrade to Django 1.6

This commit contains changes that were required for upgrading to Django 1.6. I
went through all release nots and removed deprecations of Django 1.5 and 1.6.

* The TransactionMiddleware is deprecated and replaced by the ATOMIC_REQUESTS
  field in the database configuration. This is basically the same, but there are
  two differences: 1. one cannot switch between commit and autocommit within a
  view anymore (CATMAID didn't make use of this) and 2. ATOMIC_REQUESTS only
  applies to views. TransactionMiddleware applied to all middleware classes
  coming after it in the list (CATMAID didn't make use of this,
  TransactionMiddleware was last).
* Updated the manage.py code to the currently recommended format.
* Updated django-taggit to its recent version to be compatible with Django 1.6.
  This application started using South. Therefore, the first migration of them
  have to be faked (see below).
* Update django-guardion to version 1.1.1, because it didn't support Django
  1.6 before.
* Update django-adminplus to version 0.2.1, because it didn't support Django
  1.6 before.
* Update django-devserver to git version after 0.7.0, because it caused an
  infinite recursion in Django 1.6 before:
  https://code.djangoproject.com/ticket/21348
* Update South to version 0.8.4, because it didn't fully support Django 1.6
  before.
* Update django-celery to version 3.1.1 and celery to version 3.1.7, because
  they didn't fully support Django 1.6 before.
* Let imports referring to django.conf.urls.defaults refer instead to
  django.conf.urls, because the former module was removed and it's content moved
  into the latter.
* Remove all calls to setup_environ() and execute_manager(), because these
  functions were removed. Instead use the  DJANGO_SETTINGS_MODULE env variable.
* Add missing default value (False) for a BooleanFiled, because without it, the
  the field defaults to None instead of False.

Your settings.py file needs a new setting called ALLOWED_HOSTS. Please add it
manually or re-run the create_configuration.py script. It is a list of allowed
hosts that a request's Host header can refer to. More Info can be found here:
https://docs.djangoproject.com/en/1.6/ref/settings/#std:setting-ALLOWED_HOSTS

  ALLOWED_HOSTS = ['CATMAID_SERVERNAME']

To update your virtualenv, change into the django/ directory of the CATMAID repo
and

  1. Activate the virtualenv
  2. pip uninstall django-celery
  3. pip uninstall django-devserver
  4. pip install -r pip-frozen

Don't worry, django-celery and django-devserver will be re-installed
autmatically. However, the former needs to be re-installed to prevent a small
bug and the latter needs to be forced to an updated git version.

To migrate the database, you have to do the following (in the
django/projects/mysite directory):

  1. Activate the virtualenv or make sure you are still in there
  2. ./manage.py syncdb
  3. ./manage.py migrate taggit --fake 0001
  4. ./manage.py migrate

If you see the error 'No module named five' when calling manage.py, uninstall
and then install again django-celery:

  pip uninstall django-celery
  pip install django-celery

And in case you have read Django's change notes and are now wondering whether
some other changes could be a problem: I (hopefully) checked all of them and on
two I want to comment explicitely:

  1. Django 1.5 - Non-form data in HTTP requests: request.POST will no longer
     include data posted via HTTP requests with non form-specific content-types
     in the header. […]

     => This shouldn't be a problem in our case. Queries not originating in a
        form are either sent with CATMAID's request.js or with jQuery. Both set
        the content typt to "application/x-www-form-urlencoded".

  2. Django 1.6 - Object Relational Mapper changes: These changes can result in
     some compatibility problems. For example, some queries will now generate
     different table aliases. This can affect QuerySet.extra(). […]

     => I couldn't find any differences in the queries where QuerySet.extra() is
        used.