Update requirements for Django 1.5/Django CMS 2.4

Update the pip requirements file to reflect the required packages
for Django 1.5.* and Django CMS 2.4.*

Also, remove entries in the requirements file for packages that
are not directly required by this software.  They should get
installed automatically by pip when the explicitely named
dependencies are installed.

Remove the pip requirements file for Django 1.3 as we're no longer
supporting this version

Addresses #660
Update language handling for Django CMS 2.4

Django CMS >= 2.4 stops using ``cms.middleware.multilingual.MultilingualURLMiddleware``
in favor of ``django.middleware.locale.LocaleMiddleware`` so update
the middleware settings accordingly.  ``LocalMiddleWare`` also requires
identifying language-aware patterns using ``i18n_patterns``.
See http://docs.django-cms.org/en/latest/upgrade/2.4.html#removed-the-multilingualmiddleware

In order to use ``i18n_patterns`` with the storybase app URLs, include
them using ``include`` instead of importing and concatenating them to
``urlpatterns``.

Add ``cms.middleware.language.LanguageCookieMiddleware`` to middleware
See http://docs.django-cms.org/en/latest/upgrade/2.4.html#added-languagecookiemiddleware

Addresses #660
Remove simple_language_changer

This was deprecated in Django CMS 2.4

See http://docs.django-cms.org/en/latest/upgrade/2.4.html#pending-deprecations

Addresses #660
Switch to "new-style" url tag

Starting with Django 1.5, an unquoted url name like::

    {% url myview %}

won't work ("myview" is interpretted as a variable name)
and needs to be changed to::

    {% url "myview" %}

Addresses #660
Mock as_view when testing view class methods

Mock the ``as_view()`` method of a class-based view when
unit testing methods of a view class in order to properly
bind the view arguments and keyword arguments.

See http://tech.novapost.fr/django-unit-test-your-views-en.html
Use copy instead of django.utils.copycompat

``django.utils.copycompat`` will be deprecated in Django 1.6. We
don't need it for the version of Python we support. Remove it.

Addresses #660
s/django.conf.urls.defaults/django.conf.urls/

The module ``django.conf.urls.defaults`` will be deprecated in
Django 1.6.  Use ``django.conf.urls`` instead.

Addresses #660
Update use of cache_page() decorator

Update use of the ``cache_page()`` decorator to match the correct
signature.  The old way of calling it will be deprecated.

Addresses #660
Use standalone localflavor app

``django.contrib.localflavor`` will be removed from Django core
so use the standalone app instead.

Addresses #660
Properly set up view in test

The ``story_id`` keyword argument wasn't bound to the view.

Addresses #660
Move register outside of guard

Even if we don't load the ``verbatim`` tag backbport, the module
still needs to have a ``register`` variable.

Addresses #660
Use staticfiles instead of adminmedia

The ``adminmedia`` template tag library and the ``admin_media_prefix``
template tag have been deprecated.  Use  ``STATIC_URL`` instead.

Addresses #660
Reorder ``LocaleMiddleware``

The Django docs (https://docs.djangoproject.com/en/dev/topics/i18n/translation/#how-django-discovers-language-preference)
say this about the ordering of ``LocaleMiddleware``:

>   * Make sure it’s one of the first middlewares installed.
>   * It should come after SessionMiddleware, because LocaleMiddleware
>     makes use of session data. And it should come before
>     CommonMiddleware because CommonMiddleware needs an activated
>     language in order to resolve the requested URL.
>   * If you use CacheMiddleware, put LocaleMiddleware after it.

Addresses #660
Use ``HttpRequest.body``

Use ``HttpRequest.body`` instead of ``HttpRequest.raw_post_data``
as ``HttpRequest.raw_post_data`` is deprecated

Addresses #660
Move check for Google Analytics inside method

Check for ``settings.GA_PROPERTY_ID`` inside the ``ga_campaign_params``
template tag instead of at the top of the module. This allows for the
setting to be changed at runtime for testing.

Addresses #660
Only use ``HttpRequest.body``

This is cleanup of a naive search and replace when replacing
``raw_post_data`` with ``body`` for
bd78d7df44b6d7db2e113ff64f2adfec6e64dd7f.

We're no longer supporting Django 1.3, so don't even bother checking
``django.VERSION`` to see if we should use ``raw_post_data`` or
``body``. Just use ``body``.

Addresses #660
Encode data in PUT request with test client

Encode data before passing it to the test client and set the content_type
argument to ``TestClient.PUT`` because, starting with Django 1.5, the
test client no longer encodes the data in the request for non-POST requests.

See https://docs.djangoproject.com/en/dev/releases/1.5/#options-put-and-delete-requests-in-the-test-client

Addresses #660
Use language code in URLs

The use of ``i18n_patterns`` and ``LocaleMiddleware`` required
by Django CMS >= 2.4 causes paths without a langauge prefix
to no longer resolve.  ``LocaleMiddleware`` looks for the 404
and tries to redirect to the language-aware path, but this
isn't great for our tests that expect a non-302 response.

We could have passed ``follow=True`` to the test client
methods, but in some cases, we need to explicitely test that
the user is not redirected.

The easiest way to make sure we're testing correctly is to
just test the language-aware path.

Addresses #660
storybase_asset.urls regexs should begin with '^'

If the regexs in storybase_asset.urls don't begin with '^',
they match paths like /api/0.1/assets/ASSET_ID/ when they should
only match /assets/ASSET_ID/
Use modified version of LocaleMiddleware

Use our own version of ``LocaleMiddleware`` because the Django version causes
requests to the REST API that return a 404 to be redirected to a non-existant
path.  For example, if the request to /api/0.1/stories/STORY_ID/
returns a 404 because the story with ``story_id`` of STORY_ID
doesn't exist, the middleware will instead redirect the user
to "/en/api/0.1/stories/STORY_ID/".  This path doesn't exist
as part of our API (which doesn't use language-aware URLs).

This is because of the way ``LocaleMiddleware.process_response()``
tries to automatically redirect from a non-language-aware path
to a language-aware path.

This is very similar to the problem described at
https://code.djangoproject.com/ticket/17734, but the fix doesn't
work because the URL configuration for Django CMS:

    url(r'^(?P<slug>[0-9A-Za-z-_.//]+)/$', details, name='pages-details-by-slug')

matches for language-aware paths of views that aren't
configured using i18n_patterns (in our case, the REST API).

Addresses #660