New translation system

For comment.

Separates the actual translating from the loading of language files and determining what language to use. Should make the code a lot less brittle and complicated. I've only written the easy part so far.

cc @ewinslow @mrclay @brettp