Bug #3742 - fix duplicate uniqueids in reconstruct
More changes for 2.4.17
quota: fix memory leak on repeated errors
quota: work with partial prefixes again

But don't wipe quotaroots off mailboxes which have a quotaroot shorter
than the prefix length.  This means that we match the documentation,
but are also safe.  Bonus.

Updated cassandane tests to match.
strarray: add strarray_size()
times: rewrite utility function to print time to ISO 8601

Introduce timeval_to_iso8601() to have precision of fractions of second,
it is now possible to choose precision of millisecond, microsecond or just second.

All the code to handle conversion to ISO 8601 is now revamped in the
new breakdown_time_to_iso8601() static function
imapurl: add IMAP URL formatting options

- add support for enc-user in imapurl_toURL()
- imapurl_toURL() can now generate reference to an IMAP server
quota: add quota_is_overquota()
mailbox: add mailbox_cache_get_msgid() and mailbox_count_unseen()
Add dependency to jansson library to format message event notification
Add support for event notifications on message store based on RFC5423

Fully support the event types defined in the RFC :
 - MessageAppend
 - MessageExpire
 - MessageExpunge
 - MessageNew
 - QuotaExceed
 - QuotaWithin
 - QuotaChange
 - MessageRead
 - MessageTrash
 - FlagsSet
 - FlagsClear
 - Login
 - Logout
 - MailboxCreate
 - MailboxDelete
 - MailboxRename
 - MailboxSubscribe
 - MailboxUnSubscribe
and this additionnal event type :
 - vnd.cmu.MessageCopy :
   a message has been copied.
   the parameters include the source mailbox identifier, the destination mailbox
   identifier, the source uid set and the destination uid set

And support the event parameters above :
 - bodyStructure
 - clientIP
 - clientPort
 - diskQuota
 - diskUsed
 - flagNames
 - mailboxID
 - maxMessages
 - messageContent
 - messageSize
 - messages
 - modseq
 - oldMailboxID
 - serverDomain
 - serverPort
 - service
 - timestamp
 - uidnext
 - uidset
 - uri
 - user
and those additionnals parameters :
 - vnd.cmu.oldUidset :
   included with vnd.cmu.MessageCopy. The set of IMAP UIDs referenced in source folder
 - vnd.cmu.newMessages :
   number of unseen messages in the mailbox
 - vnd.cmu.midset :
   this includes the set of Message-ID headers of IMAP UIDs referenced in uidset.

Set event_notifier with a notifyd(8) method to enable event notifications with the default useful setting
Message notification are formatted in JSON
Below an example of notification with the default setting:

{
  "event": "MessageRead",
  "timestamp": "2012-08-06T22:25:46.282+02:00",
  "uri": "imap:\/\/testtmpuser@127.0.0.3\/INBOX;UIDVALIDITY=1344284745",
  "uidset": "1:2",
}

and the same with some additionnal parameters defined with event_extra_params:

{
  "event": "MessageRead",
  "timestamp": "2012-08-06T22:25:46.282+02:00",
  "service": "imappublic",
  "uri": "imap:\/\/testtmpuser@127.0.0.3\/INBOX;UIDVALIDITY=1344284745",
  "messages": 5,
  "vnd.cmu.newMessages": 2,
  "uidnext": 6,
  "uidset": "1:2",
  "vnd.cmu.midset": [ "<cmu-lmtpd-25419-1344284746-0@localhost>", "<cmu-lmtpd-25419-1344284746-1@localhost>" ]
}
mboxevent: add support to Login and Logout event notifications
mboxevent: add support to MailboxCreate, MailboxRename and MailboxDelete event notifications
mboxevent: add support to MailboxSubscribe and MailboxUnSubscribe event notifications
mboxevent: add support to QuotaExceed, QuotaWithin and QuotaChange event notifications
mboxevent: add support to MessageAppend, MessageNew and vnd.cmu.MessageCopy event notifications
mboxevent: add support to MessageExpunge and MessageExpire event notifications
mboxevent: add support to MessageRead, MessageTrash, FlagsSet and FlagsClear event notifications
docs: add support for RFC5423
Jansson >= 2.0 is not available on the current build system - disable event notifications