cpp: xerces: Improve Document memory management and construction

Reference count the underlying Xerces-C DOMDocument.
Add constructors for strings, files and streams; this
provides the same facilities as Java XMLTools.
cpp: bioformats: Update XMLTools