Move switching languages to POST requests

Solves #2016. Core change is basically what's in the title. Also added tests to make sure this will never happen again(tm). Also did a little bit of refactoring for tests.

@jamalex if you have time to review on your trip, please do so. Otherwise merging on Monday.