Add failing test for race condition in Filter.get_or_create
Add unique constraint to filter spec so that Filter.get_or_create avoids race condition as intended - fixes #312
accommodate custom user models in migration
use Python3 compatible syntax for 'except'
Specify TEST_NAME in test settings to make concurrency tests work on sqlite.

Django 1.6 checks for this setting and defaults to None, which creates an in-memory database
when using sqlite. This causes our race condition test in wagtailimages to fail, since it's
not possible for multiple threads to share the same in-memory database.
TEST_NAME must differ from database name
Release note for #844