Fix XML-parsing related vulnerabilities by using defusedxml if available

For more details as to what vulnerabilties are there see https://pypi.python.org/pypi/defusedxml/
Merge branch 'fix_xml_vulnerabilities'