This fixes a common React warning we see. Most of these components should be using constructors instead, however componentDidMount is just as good (and doesn't require converting most of these).
Conversion to classes will be done in a later stage of React warning fixes.
For https://github.com/vector-im/riot-web/issues/12877
This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async)
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
Every file has now been manually vetted by me. Due to the extent of
the changes, I've been unable to test all scenarios to make sure this
all works. :(