adding repeated parsing and validating tests make the new DOM tree

* Makefile.am: adding repeated parsing and validating tests
* SAX2.c parser.c tree.c include/libxml/parser.h: make the new
  DOM tree building interfaces use the dictionary from the
  parsing context to build the element and attributes names
  as well as formatting spaces and short text nodes
* include/libxml/dict.h dict.c: added some reference counting
  for xmlDictPtr because they can be shared by documents and
  a parser context.
* xmlreader.c: a bit of cleanup, remove the specific tree freeing
  functions and use the standard ones now.
* xmllint.c: add --nodict
* python/libxml.c: fix a stupid bug so that ns() works on
  attribute nodes.
Daniel
diff --git a/Makefile.am b/Makefile.am
index 84f5fe9..fd6fdf3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -724,8 +724,10 @@
 	@echo "##"
 	@echo "## Timing tests to try to detect performance"
 	@echo "## as well a memory usage breakage when streaming"
-	@echo "## first when using the file interface"
-	@echo "## then when using the memory interface"
+	@echo "## 1/ using the file interface"
+	@echo "## 2/ using the memory interface"
+	@echo "## 3/ repeated DOM parsing"
+	@echo "## 4/ repeated DOM validation"
 	@echo "##"
 	-@(xmllint --stream --timing $(srcdir)/dba100000.xml; \
 	   MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
@@ -737,6 +739,16 @@
 	   if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
 	   grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0";\
 	   exit 0)
+	-@(xmllint --noout --timing --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
+	   MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+	   if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+	   grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0";\
+	   exit 0)
+	-@(xmllint --noout --timing --valid --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
+	   MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+	   if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+	   grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0";\
+	   exit 0)
 
 C14Ntests : testC14N$(EXEEXT)
 	@echo "##"