=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
Nice! You speak icelandic?
The thing is that "Jag kan äta glas utan att skada mig." doesn't come with nearly as many funky characters!
(Btw: Maybe I should attribute the [source](http://www.columbia.edu/~kermit/utf8.html#glass) of this nice translation...)