Remove Login Dropdown when Auth Views are not registered.

Fixes #1738
Merge branch 'master' of github.com:tomchristie/django-rest-framework into login-dropdown
Fix docstring
Fix imports
Moved li tags inside `optional_login`

as per https://github.com/tomchristie/django-rest-framework/pull/1820#discussion_r16987993
Alter CSRF exemption implementation

The previous implementation of decorating `APIView.dispach` with the
`csrf_exempt` decorator allowed for an easy-to-make mistake where
someone could override the `dispatch` method on a view and inadvertantly
remove the csrf exemption of their api view.

By moving the decoration of the view into the `as_view` logic, it
becomes much more difficult to make this mistake.
Merge pull request #1827 from jpadilla/master

Test with released Django 1.7
Merge pull request #1706 from pipermerriam/piper/use_decorator_mixin_class

Alter CSRF exemption implementation
Using user.get_username() instead of user.username.

This solves an error when using a auth model that does not have a username field.
Prefer `format` and use named blocks
Display validation errors on login form
Error messages are displayed below the input fields
General message error goes above submit button
Merge pull request #1833 from dpanesso/master

Using user.get_username() instead of user.username.
Input fields get hightlighted if login fails and username is persisted
Merge pull request #1820 from carltongibson/login-dropdown

Hide login link in browsable API if the login view is not registered.
Change bootstrap class warning to error
Place general error message in well
Fix returning None when allow_none is True in CharField
Check object in tests