Use a POST request for changing the server and session language

PR has some things:
1. Linting (thanks flake8!)
2. Expose `/api/i18n/set_default_language`
3. Have the session language and server language switcher use that API endpoint