Fix handling of surrogates in QBidiAlgorithm
Upstream review at https://codereview.qt-project.org/c/qt/qtbase/+/333246
This falls into the security issues category of https://community.kde.org/Qt5PatchCollection#Which_patches_does_it_include.3F
Prior code was naively assuming the character after a high surrogate would necessarily be a low surrogate, which is buggy.
Fixes oss-fuzz issue 29718.
(cherry picked from commit aeeaab1a)