Fixed #21281 -- Made override_settings act at class level when used as a...

... TestCase decorator

See https://code.djangoproject.com/ticket/21281. This is also a prerequisite for https://code.djangoproject.com/ticket/20392.