Language filter: use HTTP 301 status code for redirect instead of 301

This a **very** preliminary PR (I guess it will not even pass Travis because of some "work in progress" comments in it). It supersedes #5092 that didn't take into account every case.

I think there will be much to discuss about this...