Fix bugs handling blank messages

Fix message checking in several corner cases:
  * Serialize and deserialize values through `--remote-expr` to avoid ambiguity when vim adds trailing newlines into the output.
  * Work around http://bugs.python.org/issue7638, which causes some blank lines to be missed (because `'foo'.splitlines()` and `'foo\n'.splitlines()` are equivalent).
  * Ignore final blank message to work around vim bug that adds a spurious blank message after leaving insert mode.

Fixes #42 and #43.