XWIKI-11314: Changing the current language from the UI does not preserve the query string of the current URL.

(cherry picked from commit 5315e9c1fbfd273b26509208e3153cfc1e029308)