Fix a memory leak when XSLT.parse fails

In xslt_stylesheet.c, the method parse_stylesheet_doc() gives libxslt an error
callback and then invokes xsltParseStylesheetDoc.

Nokogiri's error callback invokes rb_exc_raise() which prevents the function
from returning to the caller. As a result libxslt never cleans up after itself
and we leak memory.

Additionally, xsltParseStylesheetDoc requires that the caller frees the XML
document on failure.

This commit fixes both of the above issues. Note one side effect -- we no longer
provide the exact reason for the parser failure in the exception. I added
rb_warning() to the error callback so that the error can be seen when Ruby is
running with $VERBOSE.

I wrote up description of how I found and fixed this leak at:
http://holymonkey.com/how-to-find-and-fix-a-memory-leak-in-a-ruby-c-extension.html
Describe XSLT parser errors in the exception message instead of using rb_warn

All XSLT parser errors will be displayed in the exception message.

When we did an rb_raise from the callback, we only got the first parser error.
A nice side effect here is that we get all errors in the exception.
Plug memory leak in XML::Text.new

XML text nodes were not being registered and never got freed and the following will eat up all memory:

  loop {
      doc = Nokogiri.XML "<r></r>"
      Nokogiri::XML::Text.new('hello', doc)
  }
Fix segfault when GC deletes a custom XSLT function instance

Got a random segfault during unit tests, and narrowed it down to
unlucky timing of the GC during an XSLT transform with custom
functions.

Fixed by maintaining an array of function objects along with the
xslt stylsheet struct, and marking the array during GC.
Fix two memory leaks with custom XSLT function arguments

Nokogiri was not freeing an array and was not freeing a libxml
XPath object.
The member doc of nokogiriTuple is a VALUE, not a libxml doc pointer

Yes, you had me fooled for a while, but I caught on. Had a few
"how the heck does this work?" moments though.
Proposed C coding style. Nokogiri is currently all over the place.
Refactor NodeSet#to_a

No need to do all those checks as they happen in
Nokogiri_wrap_xml_node already.
Plug memory leak when an xpath returns namespaces

When evaluating an xpath, we get a set of nodes and, potentially,
namespaces. The nodes are pointers to document nodes which will be
freed automatically at document deallocation.

The namespaces, however, belong to the xpath evaluation and it is
our responsibility to free them. At deallocation time we don't
know whether the document has been freed already, and it is unsafe
to traverse the node list to free our namespaces.

This fixes the issue by creating a separate list of namespaces and
freeing them at deallocation time.

An attempt at plugging this leak was made with commit dbda52b and
reverted with commit eacd089
Don't override gcc optimize flag in extconf.rb

This change allows me to compile Nokogiri with:

    $ rake compile CFLAGS="-O0"

For easier debugging.
Prevent segfault when removing namespaces on a document with XML entities
adding initial "canonicalize" method to XML::Document
canonicalize takes a block
updating c14n docs
some constants are missing
Use libxml2 from homebrew if homebrew is installed.
fixing unused variable warning
Fix meta_encoding with empty or broken Content-Type header.
Fix for issue 550 (prevent siblings from being added to root)
Fix for issue#542.