Add deeper XML checking to update-translation script

- Catch problems such as mismatched formatting characters. Remove
  messages that can give problems at runtime.

- Also remove unfinished/untranslated messages, they just take up space
  in the ts and waste parsing time.

Fixes bitcoin issue 4774.

cherry-picked from: bitcoin b62172a
Merge pull request #710 from patricklodder/1.8.1-dev-trans-xml-check

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