Add deeper XML checking to update-translation script (from bitcoin/bitcoin)

cherry-picked from: bitcoin b62172a / Fixes bitcoin issue 4774