WPML switch backend language on language switch

Since wp 4.7 the backend language is changed by changing the language in your userprofile. Using WPML, if you change the site language or post-, page language, the backend language is not changing. The code below changes the site language when changing the wpml language selector.

On init get the active wpml locale and set the site locale. Effect: backend in the same language.

From wp 4.7

The above works for wp 4.0, since wp 4.7 the language is set in the userprofile. Rather than setting the user profile we clear the language setting in the userprofile, this way the site language determines the output.