third pass at the escaping refactoring. Daniel

* xmlIO.c xmlsave.c: third pass at the escaping refactoring.
Daniel
diff --git a/xmlIO.c b/xmlIO.c
index efc991d..2f9874f 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -3029,6 +3029,8 @@
 		return(ret);
 	    }
 	    out->written += ret;
+	} else if (out->buffer->size - out->buffer->use < MINLEN) {
+	    xmlBufferResize(out->buffer, out->buffer->size + MINLEN);
 	}
 	written += nbchars;
     } while (len > 0);