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
diff --git a/buf.h b/buf.h
index 4d3afd0..da97e86 100644
--- a/buf.h
+++ b/buf.h
@@ -57,6 +57,7 @@
 xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf);
 int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
 
+int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
 #ifdef __cplusplus
 }
 #endif