more fixes and extending the tests coverage more hardeing of APIs skip

* gentest.py testapi.c: more fixes and extending the tests coverage
* xmlwriter.c list.c: more hardeing of APIs
* doc/apibuild.py: skip testapi.c when scanning the C files.
Daniel
diff --git a/list.c b/list.c
index 18a8297..f8fb18e 100644
--- a/list.c
+++ b/list.c
@@ -316,6 +316,9 @@
  */
 void xmlListDelete(xmlListPtr l)
 {
+    if (l == NULL)
+        return;
+
     xmlListClear(l);
     xmlFree(l->sentinel);
     xmlFree(l);