text nodes have no children.
root nodes can evaluate to false.

Contrary to child nodes, if a root node does not have any children, it
will resolve to false when casted to boolean.
don't include comments in simplexml child tree.

SimpleXML comments are a weird concept. They are visible in var_dumps as
comment nodes, but you cannot access them through children(), nor are
they present in for example count().

This change will prevent comments from being processed at all. It means
we move away from 5.4 validity by one step, but moves us closer by a
couple more steps due to all kinds of funky bugs this fixes.
children of simplexml nodes should inherit parent class

This already happens using simplexml_load_string, but it must also
happen when directly instantiating and specifying the XML through
constructor.