Thread safe Xerces-C setup / termination.

See http://xerces.apache.org/xerces-c/faq-parse-3.html#faq-6 for the limitations
on Xerces-C.
Use thread-safe xerces-c initialization / termination helpers.