Set back libxml_disable_entity_loader state after use

Backport of https://github.com/owncloud/3rdparty/pull/78 to stable5.

It's basically the same fix without the preview libraries which didn't exist in stable5 (no thumbnails)

@karlitschek @LukasReschke @schiesbn