Fix EZP-23364: case-correction redirects with tree_root setting

This PR resolves issue https://jira.ez.no/browse/EZP-23364

Case-correction redirect logic was not considering possible `content.tree_root.location_id` configuration option different from default content tree root. 

This is continuation of https://github.com/ezsystems/ezpublish-kernel/pull/1004 by @wizhippo, adding some additional fixes and tests.

Tests: unit test + manual integration testing.
The point was to avoid the call if not needed, but I guess not a big deal so updated in https://github.com/ezsystems/ezpublish-kernel/commit/a707fb65aa2a2c5b9f3e32a140e0f21d44ba6612.