Add a test for issue #831
add more tests to cover edge cases of outer_xml
Fix #831. XmlReader act like a real pull parser.

Previously XmlReader would parse the entire document in the
constructor even before the user start calling read() method.
remove inaccurate comment from the test.
Merge branch 'issue-831'