Fixed #21598 -- cleaned up template loader overrides in tests

- 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.
Fixed #21357 -- Fixed test client session initialization.

The test client will now create a session when it is first accessed
if no session already exists.
Fixed #22602 -- Improved code coverage of makemigrations command tests.
Fixed tuple serialization test.

Thanks to rockallite for the report.