imap: fix reading of literals during append

This makes append work for data that doesn't end with \r\n, and might also fix
corruption of lines ending with either \r or \n only.
smtp: reject auth when already authenticated
imap: reject search with extra spaces near paranthesis
Fix EmailAddress test to allow UTF-8
Make the default build target fail on unit test failure

Fixes bug 6233