=htc Fix handling of non-BMP characters in URI encoding/decoding

Closes #16014 by porting (improved versions) of these spray PRs:

- https://github.com/spray/spray/pull/855
- https://github.com/spray/spray/pull/856
No I don't, but the overlap is substantial. I had to look up _gler_ and _meiða_ since those are a bit to far off.  For Swedish you just have to use other words, "Jag kan käka glas utan att göra illa mig".