CRuby: Add a node type check when adding a child node to another.

Now Node#add_child, #prepend_child, #replace, etc. will check if a node
given is of an appropriate type as a child of the parent-to-be node,
based on the DOM specification.

Previously, it was possible to "add" a text node to another text node
thanks to the special feature implemented in xmlAddChild().  However,
because reparent_node_with() was not aware of it, such an operation
could cause a SEGV.

Our JRuby version does not support it anyway, so the CRuby counterpart
now explicitly inhibits it from now on.

This should fix #1092.
Update changelogs.
Merge branch 'check_types_before_reparent'