Bug 1002269 - trim leading newlines and trailing whitespace in client

messages