Fixed #21598 -- cleanup template loader overrides in tests

A lot of tests in template_tests repeat a try finally block for overriding the
template loader. This could be managed easily with contexts.
django.test.utils.setup_test_template_loader makes use of a function base test
template loader (which entered a deprecation timeline in 1.4) and together with
django.test.utils.restore_template_loaders could also be managed as a context.

- Template loader overriding is managed with contexts.
- The test loader is a class (function based loaders entered deprecation timeline
  in 1.4).
- Template loader overrider that overrides with test loader added.