URL handling

Well, carp. Both Qt and the code base were quite broken for this. I
implemented workarounds and fixes such that things that weren’t broken
before should stay working, for example, if qt4 worked for a lot of
this, it still would, and if Qt on Windows / Linux worked for this
before, it shall still work for it.