Add some asserts.  In sysmodule, I think these were to try to silence
some warnings from Klokwork.  They verify the assumptions of the format
of svn version output.

The assert in the thread module helped debug a problem on HP-UX.
diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c
index 448b11c..036619a 100644
--- a/Modules/threadmodule.c
+++ b/Modules/threadmodule.c
@@ -25,6 +25,7 @@
 static void
 lock_dealloc(lockobject *self)
 {
+	assert(self->lock_lock);
 	/* Unlock the lock so it's safe to free it */
 	PyThread_acquire_lock(self->lock_lock, 0);
 	PyThread_release_lock(self->lock_lock);