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

(cherry picked from commit f38bcdfbdec97938e63062aaf51a9ceb3e7169db)