fix a small initialization problem raised by Ashwin increase testing

* threads.c: fix a small initialization problem raised by Ashwin
* testapi.c gentest.py: increase testing especially for document
  with an internal subset, and entities
* tree.c: fix a deallocation issue when unlinking entities from
  a document.
* valid.c: fix a missing entry point test not found previously.
* doc/*: regenerated the APIs, docs etc.
daniel

svn path=/trunk/; revision=3778
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html
index 6adf206..b71e8f1 100644
--- a/doc/APIchunk13.html
+++ b/doc/APIchunk13.html
@@ -178,6 +178,7 @@
 <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
 <a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
 <a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
 <a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
 <a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
 <a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
@@ -302,6 +303,7 @@
 <a href="html/libxml-HTMLparser.html#htmlReadFd">htmlReadFd</a><br />
 <a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
 <a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
 <a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
 <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
 <a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
@@ -410,6 +412,7 @@
 <a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
 </dd><dt>differentiate</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
 </dd><dt>differently</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>differs</dt><dd><a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
 </dd><dt>digit</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
 </dd><dt>digits</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
 </dd><dt>dir</dt><dd><a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
@@ -590,9 +593,11 @@
 <a href="html/libxml-valid.html#xmlDumpNotationDecl">xmlDumpNotationDecl</a><br />
 <a href="html/libxml-valid.html#xmlDumpNotationTable">xmlDumpNotationTable</a><br />
 <a href="html/libxml-debugXML.html#xmlLsOneNode">xmlLsOneNode</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
 <a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
 <a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
 <a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+</dd><dt>dumping</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
 </dd><dt>dumps</dt><dd><a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
 <a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
 <a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />