applied patch from Patrick Welche provided in bug #125432 , future

* libxml.m4: applied patch from Patrick Welche provided in
  bug #125432 , future proofing the .m4 file.
* parser.c: resetting the context should also reset the error
* TODO: problem of conformance w.r.t. E20 was raised in the
  XML Core telconf and libxml2 isn't conformant there.
Daniel
diff --git a/parser.c b/parser.c
index 9d6db09..21d1b89 100644
--- a/parser.c
+++ b/parser.c
@@ -12108,6 +12108,8 @@
     if (ctxt->catalogs != NULL)
 	xmlCatalogFreeLocal(ctxt->catalogs);
 #endif
+    if (ctxt->lastError.code != XML_ERR_OK)
+        xmlResetError(&ctxt->lastError);
 }
 
 /**