fix SimpleXMLElement::addChild when passing a value

- When using specifying a value to addChild, SimpleXML does not display
it when the node is casted to a string, see the following test:
  hphp/test/slow/simple_xml/1641.php

- However, when you cast the return value of this call to string, it
does show a return value, see the following test:
  hphp/test/slow/simple_xml/1656.php (line 13)

- Additionally, this fixes "string nesting" because m_children needed to
be merged with the newly created string element due to the way strings
work in this extension.

Another test was added combining all these conditions.
move passing test from bad to good
a root node with attributes (and no children) is still true
fix offsetget when used on children()

Just like properties, when dealing with integer based lookups, we need
to iterate ourselves and pick the appropriate child.