Set back libxml_disable_entity_loader state after use

Forward port of 22e7ca04bc4c132969b1cef135bc25140b37b162 from stable6 to master

Note: I've removed the SabreDAV changes because master already have the correct version with the fixes.

Please review @schiesbn @karlitschek @DeepDiver1975 @LukasReschke