Make it reflect reality if it's been taken from the browser langs
by just getting what was saet in counterpart rather than the saved
setting.
Also fix style.
* Replace callbacks with promises
* Move plain functions to top level
* De-duplicate bits that fetched languages.json
* Take full language preference list from the browser if we
can get it, rather than just the first.
We no longer need the custom counterpart. The things that were
changed in it and reasosn we no lomger need them are:
1. set separator - this can be done with standard counterpart
2. ES6 port: this was done to allow importing as _t, but is
unnecessary with the _t wrapper function in react-sdk
(although also seems to work fine with
`import _t from 'counterpart';`)
3. Fallback to key name: unnecessary with
`setMissingEntryGenerator` in 0.18, but we've changed to just
using a fallback locale anyway since No code missing en
translations should ever make it to the devbelop branch.
4. Logging on missing translations. Unnecessary with
`onTranslationNotFound`, but now not used anyway because we
let missing translations show up in the UI as
'missing translation'
Bulk changes to imports coming in separate commit for easy reading.