oc-folder: Flags are now used in indexing db when deleting a msg

Unregistering the URL in indexing db accordingly to the flags (SOFT or HARD)
oc-calendar: wDay field cannot be negative

Furthermore, [MS-OXOCAL] Section 2.2.1.41.1 indicates:

   The wDay field is set to indicate
   the occurrence of the day of the week within the month
   (1 to 5, where 5 indicates the final occurrence during
   the month if that day of the week does not occur 5 times).

[rule firstOccurrence] may return negative values according to iCal spec for
recurrent rules iCal 4.8.5.4 Recurrence Rule. For instance, for defining
a timezone whose recurrent rule is done using this rule:

   RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU

This fixes the problem when editing a recurrent appointment in
Outlook were incorrectly shifted when SOGo provides back the event.
oc-calendar: getPidLidClipEnd now follows [MS-OXOCAL]

On recurrent events when there is no end, the time to set is
31 August 4500, 11:59 P.M ([MS-OXOCAL] Section 2.2.1.15)
oc-calendar: Fix PidLidClipStart on recurrent events

The midnight value must be in user's timezone and returned back in UTC.
oc-folder: Make deleted items synched when shared

By keeping mid on moving messages by soft deleting and
only if srcMid is different from targetMid.

This makes restore/shared deleted items work.

It also requires to do the following to work smoothly:

* Do not add soft-deleted messages in ensureIDsForChildKeys
* Return soft-deleted messages on getDeletedFMIDs
* Do not register a new mid if the URL is matched with soft deleted messages
oc-folder: Uniform call to deleteMessageWithMID

To make sure flags argument is used accordingly with the specs
and not working by chance.
Merge branch 'master' into ejhernandez/keep-fmid-on-soft-deleted-messages
Merge pull request #51 from Zentyal/ejhernandez/keep-fmid-on-soft-deleted-messages

Sync deleted appointments in shared calendars
Merge pull request #52 from Zentyal/ejhernandez/fix-some-tz-pbs

Fix timezone synchronisation between SOGo and Outlook on recurrent events
Merge branch 'master' into trusty