Operetta: prevent XML values from being truncated

The characters(...) method in the SAX handler now simply aggregates
characters between calls to startElement(...) and endElement(...).  All
of the value processing is done when endElement(...) is called, which
prevents the handler from parsing/storing incomplete values if multiple
calls to characters(...) were necessary to process a node value.
ScanR: prevent XML values from being truncated

As with f844041, this defers value parsing to the endElement(...) method
in the SAX handler instead of doing the parsing in the characters(...)
method.
Operetta/ScanR: minor code cleanup
Merge pull request #662 from melissalinkert/xml-fixes

Fix SAX handler implementations to prevent value truncation