Adding a new buf module for buffers

This also add converter functions between xmlBuf and xmlBuffer
* buf.c buf.h: the old xmlBuffer routines but modified for size_t
  and using xmlBuf instead of xmlBuffer
* Makefile.am: add the 2 new files
* include/libxml/xmlerror.h: add an entry for the new module
* include/libxml/tree.h: expose the xmlBufPtr type but not the
  structure which stay private
Convert XPath to xmlBuf

Easy as no buffer was exported in the APIs
Adding new encoding function to deal with the new structures

* encoding.c: adds xmlCharEncFirstLineInput, xmlCharEncInput and
  xmlCharEncOutput
* enc.h: the functions are not made public but added to this new header
Incompatible change to the Input and Output buffers

Since the whole set of structures was public, the only way
to switch to size_t clean buffer is to introduce an incompatible
API change. Modifying the xmlParserInputBuffer and xmlOutputBuffer
structures is the best place to make this change as those
structures are deep into the parser feeding data, and no public
API suggest to build those manually.
Convert XML parser to the new input buffers

The main changes are when the internal of the buffers structure
were adressed directly, we now use routines coming from buf.h
The routine xmlParserInputRead() which wasn't used anywhere is
deprecated too.
Convert xmlIO.c to the new input and output buffers

Relatively mechanical changes, this also led to a couple of fixes
upon review of the I/O code on buffer usage.
Convert C14N to the new Input buffer

one case of direct access cleaned up
Convert catalog code to the new input buffers

Only one place where the buffers fields where accessed directly
Convert XInclude to the new input buffers

A few xmlBuffer...() calls changed to their xmlBuf...() counterparts
Provide new xmlBuf based saving functions

* include/libxml/tree.h: adds xmlBufGetNodeContent and xmlBufNodeDump
  as xmlBuf based equivalents of xmlNodeGetContent and xmlNodeDump
* tree.c: implements one new routine and converts xmlNodeBufGetContent
  to use the xmlBuf equivalent. It should behave better as a result
  in case of data larger than 2GB.
New saving functions using xmlBuf and conversion

* save.h: new header providing new functions currently internal
          and xmlBuf counterparts of old xmlBuffer based ones
* xmlsave.c: convert functions to use xmlBuf as much as possible
Convert XMLReader to the new input buffers

A few direct access were replaced, and also one internal
xmlBuffer structure is converted to use xmlBuf instead
Convert the writer to new output buffer and save APIs

Only a handful of places had to be converted for xmlBuf and
the new saving entry point.
Convert of the HTML parser to new input buffers

Changes similar to the ones done in the XML parser for the
routines which are not shared.
Convert the HTML tree module to the new buffers

The new input buffers induced a couple of changes, the others
are related to the switch to xmlBuf in saving routines.
Swicth the test program for characters to new input buffers

it was manipulating the buffer content and structures directly
this cleans it up
Cleanup function xmlBufResetInput() to set input from Buffer

This was scattered in a number of modules, xmlParserInputPtr
have usually their base, cur and end pointer set from an
xmlBuf used as input.
* buf.c buf.h: add a new function implementing this setup
* parser.c HTMLparser.c catalog.c parserInternals.c xmlreader.c
  use the new function instead of digging into the buffer in
  all those modules
More cleanups for input/buffers code

When calling xmlParserInputBufferPush, the buffer may be reallocated
and at the input level the pointers for base, cur and end need to
be reevaluated.
* buf.c buf.h: add two new functions, one to get the base from the
  input of the buffer, and another one to reset the pointers based
  on the cur and base inded
* HTMLparser.c parser.c: cleanup to use the new helper functions
  as well as making sure size_t is used for the indexes computations
Harden the buffer code and make it more compatible

Mimic the old xmlBuffer strcture in xmlBuf to avaoid catastrophic
failures in case of old code directly reading ctxt->input->buf->buffer

Check on all buffer entry points if an error previously occured on
the buffer, and fail the operation if this is the case, the buffer
becomes immutable and unreadable.
Small cleanup of unused variables in test