Second part of #39800. This greatly simplifies SanitiseXMLString (DEBUG_NODE_XML thing) by delegating most of its work on validating UTF-8 to Utf8CodepointLen which became more suitable for this use as of late.
SanitiseXMLString
DEBUG_NODE_XML
Utf8CodepointLen