Bug 683700 - vdx full of errors

Ensure message_error strings are linefeed-terminated.
Plus fixes merged from master:

cairo: don't screw cairo's matrix by scaling with 0
Seen with the VDX attached to bug 683700 - maybe there is also something wrong with the import?

vdx: UTF-8 safe variant to remove last newline
With the VDX attached to bug 683700 scrambled text appeared. Now corrected with the UTF-8 safe variant to search and replace "\n".