added xmlByteConsumed() interface updated the benchmark rebuilt the docs

* parserInternals.c xmlIO.c encoding.c include/libxml/parser.h
  include/libxml/xmlIO.h: added xmlByteConsumed() interface
* doc/*: updated the benchmark rebuilt the docs
* python/tests/Makefile.am python/tests/indexes.py: added a
  specific regression test for xmlByteConsumed()
* include/libxml/encoding.h rngparser.c tree.c: small cleanups
Daniel
diff --git a/parserInternals.c b/parserInternals.c
index b6601d3..d03e3d4 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -1110,6 +1110,7 @@
          */
         if ((input->buf->buffer != NULL) && (input->buf->buffer->use > 0)) {
             int processed;
+	    unsigned int use;
 
             /*
              * Specific handling of the Byte Order Mark for 
@@ -1145,6 +1146,8 @@
             xmlBufferShrink(input->buf->buffer, processed);
             input->buf->raw = input->buf->buffer;
             input->buf->buffer = xmlBufferCreate();
+	    input->buf->rawconsumed = processed;
+	    use = input->buf->raw->use;
 
             if (ctxt->html) {
                 /*
@@ -1170,6 +1173,7 @@
                                NULL);
                 return (-1);
             }
+	    input->buf->rawconsumed += use - input->buf->raw->use;
             input->base = input->cur = input->buf->buffer->content;
             input->end = &input->base[input->buf->buffer->use];