restore libxml error handler state after clearing