=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
I see. I since the Swedish translation is a bit off, maybe we should submit some kind of PR to the source page... :)