autogenerate a minimal NULL value sequence for unknown pointer types This

* gentest.py testapi.c: autogenerate a minimal NULL value sequence
  for unknown pointer types
* HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c
  parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c
  xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c
  xpointer.c: This uncovered an impressive amount of entry points
  not checking for NULL pointers when they ought to, closing all
  the open gaps.
Daniel
diff --git a/xmlschemas.c b/xmlschemas.c
index 87fbca3..d7fa515 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -2434,6 +2434,8 @@
 void
 xmlSchemaDump(FILE * output, xmlSchemaPtr schema)
 {
+    if (output == NULL)
+        return;
     if (schema == NULL) {
         fprintf(output, "Schemas: NULL\n");
         return;
@@ -12574,6 +12576,8 @@
     xmlSchemaTypePtr nonNegativeIntegerType = NULL;
     int ret = 0, reuseValCtxt = 0;
 
+    if ((facet == NULL) || (typeDecl == NULL))
+        return(-1);
     /* 
     * TODO: will the parser context be given if used from
     * the relaxNG module?