hum try to avoid some troubles when the library is not initialized and one

* HTMLtree.c tree.c threads.c: hum try to avoid some troubles
  when the library is not initialized and one try to save, the
  locks in threaded env might not been initialized, playing safe
* xmlschemastypes.c: apply patch for hexBinary from Charles Bozeman
* test/schemas/hexbinary_* result/schemas/hexbinary_*: also added
  his tests to the regression suite.
Daniel
diff --git a/tree.c b/tree.c
index e76b348..4dd1027 100644
--- a/tree.c
+++ b/tree.c
@@ -6831,6 +6831,8 @@
     int ret;
     xmlOutputBufferPtr outbuf;
 
+    xmlInitParser();
+
     if (cur == NULL) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
@@ -6879,6 +6881,8 @@
 {
     xmlOutputBufferPtr outbuf;
 
+    xmlInitParser();
+
     if (cur == NULL) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
@@ -7302,7 +7306,11 @@
 #ifdef LIBXML_HTML_ENABLED
     xmlDtdPtr dtd;
     int is_xhtml = 0;
+#endif
 
+    xmlInitParser();
+
+#ifdef LIBXML_HTML_ENABLED
     dtd = xmlGetIntSubset(doc);
     if (dtd != NULL) {
         is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
@@ -7345,6 +7353,8 @@
     int is_xhtml = 0;
 #endif
 
+    xmlInitParser();
+
     xmlOutputBufferWriteString(buf, "<?xml version=");
     if (cur->version != NULL) 
 	xmlBufferWriteQuotedString(buf->buffer, cur->version);