Fixed #22018 -- Fixed checks for ModelAdmin.fields not handling sub-lists.

Flatten a level of sublists before checking for duplicate fields.

When given sublists such as:

```python

class FooAdmin(admin.ModelAdmin):
    fields = ('one', ('one', 'two'))
```

The previous code did not correctly detect the duplicated 'one' field.

Thanks to jwa for the report.
Fixed typo in comment.
Fixed two typos.
Fixed #19299 -- Fixed Nullification of Foreign Keys To CharFields

Thanks tunixman for the report and Baptiste Mispelon and
Shai Berger for reviews.
Fixed #18373 - improved handling of Resolver404s from views

When django.core.urlresolvers.resolve was called from a view, failed
and the exception was propagated and rendered by technical_404_response,
the URL mentioned on the page was the current URL instead of the URL
passed to resolve().

Fixed by using the path attribute from the Resolver404 exception instead
of request.path_info. Also cleaned up the exceptions to use standard
named parameters instead of stuffing a dict in args[0]
Fixed #21884 -- Mentioned that exact is the defaut QuerySet lookup type

Thanks to cjerdonek for the suggestion.
Fixed #21765 -- Added support for comparing Context instances
Fixed #21912 -- Improved error message if a view returns None.

Thanks brycenesbitt for the report.
Fixed some flake8 errors from recent commits.
Fixed #22047 -- detecting related_name clash with inheritance

Thanks to mondone for fruitful colaboration.
Improved fix for #18373 -- backward compatibility

Commit 79558c78 cleaned up the (undocumented) interface of Resolver404
exception, which breaks compatibility with code messing with .args[0]
directly. Revert the cleanup part and simply leave the fix itself.
Fixed #22013 -- Documented difference between SERVER_EMAIL and DEFAULT_FROM_EMAIL.
Fixed #21725 -- Fixed JavaScript quoting encoding.

Thanks to nedbatchelder for the report.
Corrected a pair of flake8 violations
Merge remote-tracking branch 'upstream/master'

Conflicts:
	django/template/context.py
	tests/template_tests/test_context.py