fixed a serious problem when substituing entities using the Reader, the

* parser.c xmlreader.c include/libxml/parser.h: fixed a serious
  problem when substituing entities using the Reader, the entities
  content might be freed and if rereferenced would crash
* Makefile.am test/* result/*: added a new test case and a new
  test operation for the reader with substitution of entities.
Daniel
diff --git a/result/rdf1.rde b/result/rdf1.rde
new file mode 100644
index 0000000..b34399c
--- /dev/null
+++ b/result/rdf1.rde
@@ -0,0 +1,214 @@
+0 1 RDF:RDF 0 0
+1 14 #text 0 1 
+  
+1 1 RDF:Description 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Name 0 0
+3 3 #text 0 1 rpm
+2 15 RPM:Name 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Version 0 0
+3 3 #text 0 1 2.5
+2 15 RPM:Version 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Release 0 0
+3 3 #text 0 1 2
+2 15 RPM:Release 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Arch 0 0
+3 3 #text 0 1 i386
+2 15 RPM:Arch 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Os 0 0
+3 3 #text 0 1 Linux
+2 15 RPM:Os 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Distribution 0 0
+3 3 #text 0 1 Manhattan 
+2 15 RPM:Distribution 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Vendor 0 0
+3 3 #text 0 1 Red Hat Software
+2 15 RPM:Vendor 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Packager 0 0
+3 3 #text 0 1 Red Hat Software <bugs@redhat.com>
+2 15 RPM:Packager 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Group 0 0
+3 3 #text 0 1 Utilities/System
+2 15 RPM:Group 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Summary 0 0
+3 3 #text 0 1 Red Hat Package Manager
+2 15 RPM:Summary 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Description 0 0
+3 3 #text 0 1 RPM is a powerful package manager, which can be used to build, install,
+query, verify, update, and uninstall individual software packages. A
+package consists of an archive of files, and package information, including
+name, version, and description.
+2 15 RPM:Description 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Copyright 0 0
+3 3 #text 0 1 GPL
+2 15 RPM:Copyright 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Changelog 0 0
+3 3 #text 0 1 * Sun May 10 1998 Prospector System <bugs@redhat.com>
+  - translations modified for de, fr, tr
+
+2 15 RPM:Changelog 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Sources 0 0
+3 3 #text 0 1 rpm-2.5-2.src.rpm
+2 15 RPM:Sources 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:SourcesFtp 0 0
+3 3 #text 0 1 ftp://ftp.redhat.com/pub/redhat/redhat-5.1/SRPMS
+2 15 RPM:SourcesFtp 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:BuildDate 0 0
+3 3 #text 0 1 Sun May 10 14:52:32 1998
+2 15 RPM:BuildDate 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Date 0 0
+3 3 #text 0 1 894826352
+2 15 RPM:Date 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Size 0 0
+3 3 #text 0 1 850599
+2 15 RPM:Size 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:BuildHost 0 0
+3 3 #text 0 1 porky.redhat.com
+2 15 RPM:BuildHost 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Provides 0 0
+3 14 #text 0 1 
+      
+3 1 RDF:Bag 0 0
+4 14 #text 0 1 
+        
+4 1 RPM:Resource 0 0
+5 3 #text 0 1 rpm
+4 15 RPM:Resource 0 0
+4 14 #text 0 1 
+      
+3 15 RDF:Bag 0 0
+3 14 #text 0 1 
+    
+2 15 RPM:Provides 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Requires 0 0
+3 14 #text 0 1 
+      
+3 1 RDF:Bag 0 0
+4 14 #text 0 1 
+        
+4 1 RPM:Resource 0 0
+5 3 #text 0 1 /bin/sh
+4 15 RPM:Resource 0 0
+4 14 #text 0 1 
+        
+4 1 RPM:Resource 0 0
+5 3 #text 0 1 ld-linux.so.2
+4 15 RPM:Resource 0 0
+4 14 #text 0 1 
+        
+4 1 RPM:Resource 0 0
+5 3 #text 0 1 libc.so.6
+4 15 RPM:Resource 0 0
+4 14 #text 0 1 
+        
+4 1 RPM:Resource 0 0
+5 3 #text 0 1 libdb.so.2
+4 15 RPM:Resource 0 0
+4 14 #text 0 1 
+        
+4 1 RPM:Resource 0 0
+5 3 #text 0 1 libz.so.1
+4 15 RPM:Resource 0 0
+4 14 #text 0 1 
+        
+4 1 RPM:Resource 0 0
+5 3 #text 0 1 /bin/bash
+4 15 RPM:Resource 0 0
+4 14 #text 0 1 
+        
+4 1 RPM:Resource 0 0
+5 3 #text 0 1 /bin/sh
+4 15 RPM:Resource 0 0
+4 14 #text 0 1 
+      
+3 15 RDF:Bag 0 0
+3 14 #text 0 1 
+    
+2 15 RPM:Requires 0 0
+2 14 #text 0 1 
+    
+2 1 RPM:Files 0 0
+3 3 #text 0 1 /bin/rpm
+/usr/bin/find-provides
+/usr/bin/find-requires
+/usr/bin/gendiff
+/usr/bin/rpm2cpio
+/usr/doc/rpm-2.5
+/usr/doc/rpm-2.5/CHANGES
+/usr/doc/rpm-2.5/RPM-PGP-KEY
+/usr/doc/rpm-2.5/buildroot
+/usr/doc/rpm-2.5/dependencies
+/usr/doc/rpm-2.5/format
+/usr/doc/rpm-2.5/groups
+/usr/doc/rpm-2.5/macros
+/usr/doc/rpm-2.5/queryformat
+/usr/doc/rpm-2.5/relocatable
+/usr/doc/rpm-2.5/signatures
+/usr/doc/rpm-2.5/spec
+/usr/doc/rpm-2.5/triggers
+/usr/lib/rpmpopt
+/usr/lib/rpmrc
+/usr/man/man8/rpm.8
+/usr/man/man8/rpm2cpio.8
+/usr/share/locale/de/LC_MESSAGES/rpm.mo
+/usr/share/locale/fr/LC_MESSAGES/rpm.mo
+/usr/share/locale/pt-br/LC_MESSAGES/rpm.mo
+/usr/share/locale/sv/LC_MESSAGES/rpm.mo
+/usr/share/locale/tr/LC_MESSAGES/rpm.mo
+/usr/src/redhat
+/usr/src/redhat/BUILD
+/usr/src/redhat/RPMS
+/usr/src/redhat/RPMS/i386
+/usr/src/redhat/RPMS/noarch
+/usr/src/redhat/SOURCES
+/usr/src/redhat/SPECS
+/usr/src/redhat/SRPMS
+
+2 15 RPM:Files 0 0
+2 14 #text 0 1 
+  
+1 15 RDF:Description 0 0
+1 14 #text 0 1 
+
+0 15 RDF:RDF 0 0