caldav/carddav: make db changes in mailbox_update_indexes

This means that replication "just works"[tm] for caldav and
carddav indexes
http_carddav.c: remove unused variable
Fix build issues with/without support for HTTP/DAV now that DAV DB changes occur in mailbox_update_indexes()
sync_support.c: when replicating DAV mailboxes, make sure to set the correct MBTYPE on creation, otherwise mailbox_update_indexes() won't do anything
imapd.c: sync mailbox annotations when doing XFER
annotate.c: added support for replicating DAV properties
imapd.c: use write locks for final sync rather than exclusive locks (client connect may block XFER otherwise)
imapd.c: don't bother dealing with renames during xfer_finalsync(), just bail and have the client retry the XFER operation (sync_do_user or sync_do_mailboxes will handle the rename)
imapd.c: no need for a loop around sync_reserve_partition() in sync_mailbox() - we are only handling one mailbox at a time
ptclient/Makefile.in: need to link libical and sqlite3 (for mailbox.c)
imapd.c: added trace logging for XFER
sync_support.c, mboxlist.c: merged sync verbose params into 'flags' param.  added 'localonly' flag to mode-switch between XFER and normal replication
mailbox create: set mbtype on create
sync_client.c, sync_reset.c: added -L option (local only) to suppress mupdate operations
imapd.c: break initial XFER sync into its own function.  rebuild XFER item list after initial user sync
fix typo in comment
sync_support.c, sync_client.c, imapd.c: added support for replicating mailboxes/users to a particular partition
imapd.c, sync_support.c: make sure we have a dest partition specified before calling functions that require one
sync: support replicating mailbox type
mboxlist.c: support CALENDAR and ADDRESSBOOK for mbtype tp/from string