Add JSON MIME types to HttpResponse in resolve() per digi604's direction

This fixes an issue where the side frame causes redirects to non-sensical URLs of the type: `http://127.0.0.1/en/<html><body>en</body></html>` or similar.
fixes correct descendants language
fixes #2834
fixes #2833
Merge pull request #2837 from mkoistinen/json_mime_type_for_2788

Add JSON MIME types to HttpResponse in resolve() per digi604's direction
Merge pull request #2838 from digi604/fix-2834

Fix 2834 (page tree expansion preview link)
Merge pull request #2839 from digi604/fix-2833

fixes #2833