Make illegal characters detection even more strict

The previous implementation allowed for high surrogates followed by
non-low surrogates. We now assure that every high surrogate is followed
by a low surrogate (under the assumption that the last byte in an XMPP
stream can not be a unicode surrogate pair).

OF-391