Extract the existing CSS byte-decoding utility: protocol label, initial @charset and environment fallback selection, BOM precedence and the actual encoding returned for imports. Include its existing 1024-byte charset-sniffing regression test.
Source-commit: ccf589ee8a
Add an incremental XHR text/document decoder that distinguishes text, XML and HTML response kinds. BOM precedence, transport charset, XML declarations and HTML sniffing retain state across arbitrary chunk boundaries. Native unit tests cover all split points and truncated input. This PR adds the decoder API; switching every XHR producer to it is separate work.