fix a small initialization problem raised by Ashwin increase testing

* threads.c: fix a small initialization problem raised by Ashwin
* testapi.c gentest.py: increase testing especially for document
  with an internal subset, and entities
* tree.c: fix a deallocation issue when unlinking entities from
  a document.
* valid.c: fix a missing entry point test not found previously.
* doc/*: regenerated the APIs, docs etc.
daniel

svn path=/trunk/; revision=3778
diff --git a/threads.c b/threads.c
index 12b1eec..23cb200 100644
--- a/threads.c
+++ b/threads.c
@@ -73,6 +73,10 @@
 	   __attribute((weak));
 extern int pthread_cond_init ()
 	   __attribute((weak));
+extern int pthread_cond_destroy ()
+	   __attribute((weak));
+extern int pthread_cond_wait ()
+	   __attribute((weak));
 extern int pthread_equal ()
 	   __attribute((weak));
 extern pthread_t pthread_self ()
@@ -860,6 +864,8 @@
             (pthread_mutex_lock != NULL) &&
             (pthread_mutex_unlock != NULL) &&
             (pthread_cond_init != NULL) &&
+            (pthread_cond_destroy != NULL) &&
+            (pthread_cond_wait != NULL) &&
             (pthread_equal != NULL) &&
             (pthread_self != NULL) &&
             (pthread_cond_signal != NULL)) {