adding the tree debug mode fixing various problems reported by the debug

* debugXML.c include/libxml/debugXML.h include/libxml/xmlerror.h:
  adding the tree debug mode
* parser.c relaxng.c tree.c xpath.c: fixing various problems reported
  by the debug mode.
* SAX2.c: another tree fix from Rob Richards
Daniel
diff --git a/relaxng.c b/relaxng.c
index 8eb81ec..9c6cf2d 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -6749,7 +6749,7 @@
 }
 
 /**
- * xmlRelaxNGCheckAttributes:
+ * xmlRelaxNGCleanupAttributes:
  * @ctxt:  a Relax-NG parser context
  * @node:  a Relax-NG node
  *