Add support for authenticating to Dovecot

The primary advantage of using this instead of the IMAP module is that a
CalDAV sync doesn't cause syslog to be spammed with lots of login/logout
events in a short amount of time (I've seen bursts of 10/sec sustained
for about a minute during initial download of a calendar).

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Merge branch 'master' into dovecot-auth