Rewrote translation selector.

Rewrote the code to discover the users preferred language
and moved it out of the SyncthingCtrl. Added basic
validation to /rest/lang and simplified the function.