Modifications to smooth Django 1.5/1.6 compatibility

- Changes `django.core.url` imports to be forward compatible w/ Django 1.6+.
  - Tries the new import path, then catches `ImportError` on failure and tries the old import path.
- Modify inline templates to handle slight Django 1.6+ backwards incompatibility
  - In https://code.djangoproject.com/ticket/13696 (which was applied to Django 1.7 and backported to Django 1.6), `django.contrib.admin.helpers.InlineAdminForm.has_auto_field` was changed to `needs_explicit_pk_field`.