Following on from https://github.com/matrix-org/matrix-react-sdk/pull/3637 this removes the code dealing with themes in vector/index.js and uses the code from react-sdk. The two did almost exactly the same thing but in subtley different ways. This code can be incredibly subtle though, so doing this a separate PR.