Fix XSD validation bug #630130

This bug in xmlschemas made validation with the GML Schemas fail
Test cases to be commited separately
Fix RELAX NG include bug #655288

When overriding during include, children of the root
node are scanned. But the root node was gotten with
doc->children, instead of xmlDocGetRootElement.
Fix an off by one error in encoding

this off by one error doesn't seems to reproduce on linux
but the error is real.
Hardening of XPath evaluation

Add a mechanism of frame for XPath evaluation when entering a function
or a scoped evaluation, also fix a potential problem in predicate
evaluation.
Fix the Windows build files

Patches comming from KDE project for Windows portability

https://projects.kde.org/projects/kdesupport/emerge/repository/revisions/master/entry/portage/testing/libxml2-test/libxml2-2.7.8-20110801.diff

To build libxml2 I had to patch the build system a little bit.
The windows build system tries to link about zdll, but on windows
its called zlib* too, so linking against z is enough.
Also the --include and the --lib command was ignored.

For the http and ftp stuff linking against some windows library's was
forgotten for mingw.
Fix missing error status in XPath evaluation

Started by Chris Evans, I added a few more place where the
error should have been set in the evaluation context.
Fix an unimplemented part in RNG value validation

Forgot to implement <optional> this was raised again
in https://bugzilla.redhat.com/show_bug.cgi?id=752393
as this make libxml2 fail to validate against ODF RNGs

Daniel
Fix a schema type duration comparison overflow

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

Based on the fix suggested by Nick Pope <nick@nickpope.me.uk>
but just changing the casts to avoid using long long type
Fix some potential problems on reallocation failures(parser.c)

This problem is the same as d7958b21e7f8c447a26bb2436f08402b2c308be4.
The operation "ctxt->nameMax * = 2;" should be placed after the function
call of xmlRealloc().
Improve the error report on undefined REFs

Use the tree node to provide the error context instead
of the parser input which is not relevant anymore,
based on a suggestion by François Delyon <f.delyon@satimage.fr>
Make sure the parser returns when getting a Stop order

patch backported from chromiun bug fixes, assuming author is Chris
Fix an allocation error when copying entities
autogen.sh: Honor NOCONFIGURE environment variable

See http://people.gnome.org/~walters/docs/build-api.txt
Augment the list of ignored files
fix a pair of possible out of array char references

When serializing char references back to an character string
Reported by Abhishek Arya <inferno@chromium.org>
Clarify the need to use xmlFreeNode after xmlUnlinkNode

Just add one small sentence to the xmlUnlinkNode function comments
fix reference to STDOUT_FILENO on MSVC

The Microsoft Visual C++ compiler doesn't have unistd.h and thus
STDOUT_FILENO is undefined. Define it using stdio.h functions.
Fix SAX2 builder in case of undefined element namespaces

Work as in XML-1.0 before namespaces, and use prefix:localname
as the new element name (and no namespace of course)
Also fix 3 cases in the regression tests where the prefix: was
erroneously dropped in such case
Fix SAX2 builder in case of undefined attributes namespace

To follow the early XML-1.0 REC, the new localname is "prefix:localname"
and there is obviously now namespace.
autogen: Only check for libtoolize

The system /usr/bin/libtool may not be in all installations.