Allow doctype declaration for JaCoCo

After the fix for Cobertura as in #16, I now have the same issue for JaCoCo. See https://travis-ci.org/gesellix-docker/docker-client/builds/29244127 for an example.

This PR extracts the XmlParser and its configuration into a factory to avoid future inconsistencies.

Some unused imports have been removed, too :)