more fixes and extending the tests coverage adding a type init interface

* gentest.py testapi.c: more fixes and extending the tests coverage
* relaxng.c include/libxml/relaxng.h: adding a type init interface
* include/libxml/xmlerror.h parser.c xmlreader.c xmlwriter.c: more
  cleanups and bug fixes raised by the regression tests
Daniel
diff --git a/relaxng.c b/relaxng.c
index ae6c63d..146e9ea 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -2781,7 +2781,7 @@
  *
  * Returns 0 in case of success and -1 in case of error.
  */
-static int
+int
 xmlRelaxNGInitTypes(void)
 {
     if (xmlRelaxNGTypeInitialized != 0)