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 #4774.

Rebased-From: da59f28
Rebased-By: Wladimir J. van der Laan
Filter translations through new update-translations script

This does not add any new messages from transifex, it just filters the
current ones.