cleanup the output buffer support to at least get the basic to work fixes

* python/generator.py python/libxml.c python/libxml_wrap.h:
  cleanup the output buffer support to at least get the basic
  to work
* python/tests/outbuf.py python/tests/serialize.py: fixes and
  cleanup.
* include/libxml/xmlwriter.h: cleanup
Daniel
diff --git a/python/generator.py b/python/generator.py
index 55bdd0b..3896177 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -321,6 +321,10 @@
         return 1
     if name == "xmlTextReaderValue":
         return 1
+    if name == "xmlOutputBufferClose": # handled by by the superclass
+        return 1
+    if name == "xmlOutputBufferFlush": # handled by by the superclass
+        return 1
     return 0
 
 def print_function_wrapper(name, output, export, include):
@@ -996,7 +1000,7 @@
 		    rlist = reference_keepers[classname]
 		    for ref in rlist:
 		        classes.write("        self.%s = None\n" % ref[1])
-		classes.write("        self._o = None\n")
+		classes.write("        self._o = _obj\n")
 		classes.write("        %s.__init__(self, _obj=_obj)\n\n" % (
 			      classes_ancestor[classname]))
 		if classes_ancestor[classname] == "xmlCore" or \