Fix and add const qualifiers

For https://bugzilla.gnome.org/show_bug.cgi?id=689483

It seems there are functions that do use the const qualifier for some of the
arguments, but it seems that there are a lot of functions that don't use it and
probably should.

So I created a patch against 2.9.0 that makes as much as possible const in
tree.h, and changed other files as needed.

There were a lot of cases like "const xmlNodePtr node".  This doesn't actually
do anything, there the *pointer* is constant not the object it points to. So I
changed those to "const xmlNode *node".

I also removed some consts, mostly in the Copy functions, because those
functions can actually modify the doc or node they copy from
diff --git a/buf.h b/buf.h
index e8c7715..ebdc978 100644
--- a/buf.h
+++ b/buf.h
@@ -50,8 +50,8 @@
 int xmlBufAddLen(xmlBufPtr buf, size_t len);
 int xmlBufErase(xmlBufPtr buf, size_t len);
 
-/* const xmlChar * xmlBufContent(const xmlBufPtr buf); */
-/* const xmlChar * xmlBufEnd(const xmlBufPtr buf); */
+/* const xmlChar * xmlBufContent(const xmlBuf *buf); */
+/* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
 
 xmlChar * xmlBufDetach(xmlBufPtr buf);