cpp: xerces: Simplify Xerces-C wrapping and add writer helpers

The base class now uses a std::shared_ptr with a custom deleter.
For managed types, the deleter calls the release member function
of the type.  For unmanaged types, the deleter is a no-op.  This
means the wrappers no longer need to be templates and so the
implementation is rather simpler than previously.  The other
change to the design is that the shared_ptr construction with
custom deleter is moved out of the base class and into the
top-level wrapper, allowing the behaviour to be changed, e.g.
for NodeList.

Update Document helpers to add utility functions for writing
Document and Node elements to strings, streams and files.
cpp: bioformats: Implement validateXML in XMLTools