improve first-of-type, last-of-type, nth-of-type, nth-last-of-type pseudo selectors
tests for *-child selectors with class
add tests for *-child pseudo selectors with classes
fix all *-child pseudo selectors when used with a class and remove need for preprocessing the node tree
Add check for Array type in doc.canonicalize to avoid segfaulting
Fix interpretation of false as param to doc.canonicalize
Simplify the nil/false test in #canonicalize.
Merge pull request #992 from larskanis/accept-false-as-with_comment-in-canonicalize

Fix interpretation of false as param to doc.canonicalize
Throw TypeErrors in java #canonicalize and allow one or two parameter form, too.
Get loaded_parser_version to parse a version string with a suffix correctly.

Libxml2 built from a VCS checkout will have a version string that
looks like "020800-GITv2.8.0".
Add Nokogiri::XML::DTD#html_dtd? and #html5_dtd?.
Simplify meta_encoding and meta_content_type (private).
Fix a typo luckily caused no problem.
Add Nokogiri::XML::Node#prepend_child. #664
Put <title> in <head> if it exists.
Prefer XPath queries to CSS selectors for performance.
Make Nokogiri::HTML::Document#meta_encoding= add a meta element if not present.
Add a note that libxml2 automatically inserts a meta tag in <head>.
Work around broken vsnprintf implementation in mingw.

This fixes failing tests in XML::TestSaxEntityReference.
Skip some DTDs that JRuby Nokogiri cannot parse.

NullPointerException still occurs in #internal_subset.