Threaded HTML Parser has an extra copy of every byte from the network
https://bugs.webkit.org/show_bug.cgi?id=111135

Reviewed by Adam Barth.

Source/WebCore:

Every LayoutTest executes this code in threaded parsing mode.

* dom/DecodedDataDocumentParser.cpp:
(WebCore::DecodedDataDocumentParser::appendBytes):
 - Pass ownership of the decoded string to the parser.
(WebCore::DecodedDataDocumentParser::flush):
 - Same.
* dom/DecodedDataDocumentParser.h:
(DecodedDataDocumentParser):
* dom/Document.cpp:
(WebCore::Document::setContent):
* dom/DocumentParser.h:
(DocumentParser):
* dom/RawDataDocumentParser.h:
(WebCore::RawDataDocumentParser::append):
* html/FTPDirectoryDocument.cpp:
(FTPDirectoryDocumentParser):
(WebCore::FTPDirectoryDocumentParser::append):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::append):
* html/parser/HTMLDocumentParser.h:
(HTMLDocumentParser):
* html/parser/HTMLViewSourceParser.cpp:
(WebCore::HTMLViewSourceParser::append):
* html/parser/HTMLViewSourceParser.h:
(HTMLViewSourceParser):
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::append):
* html/parser/TextDocumentParser.h:
(TextDocumentParser):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::append):
* xml/parser/XMLDocumentParser.h:
(XMLDocumentParser):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::resumeParsing):

Source/WTF:

The threaded html parser needs to accept ownership
of a string buffer.  The easiest way to do this seemed
to be to use a PassRefPtr<StringImpl>, but there was no way
to generated one from a String (easily), so I added one.

* wtf/text/WTFString.h:
(WTF::String::releaseImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144498 268f45cc-cd09-0410-ab3c-d52691b4dbfc