Fixes problem when not using offline cache on the start of thunderbird we did not do an initial sync.

Signed-off-by: Michel <info@1st-setup.nl>
On initial sync we only filter out the recurringmaster items and only the created items.
On initial sync we only receive created and not updated or deleted.

Signed-off-by: Michel <info@1st-setup.nl>
Moved to using xml2json

Signed-off-by: Michel <info@1st-setup.nl>
Use undefined instead of null when uid does not exist.

Signed-off-by: Michel <info@1st-setup.nl>
Changed the way we do the first folder synchronisation

Signed-off-by: Michel <info@1st-setup.nl>
Moved functions to global function object

Signed-off-by: Michel <info@1st-setup.nl>
Changed initial sync when we have no syncstate yet.
This initial sync is a lot faster than before.

Signed-off-by: Michel <info@1st-setup.nl>
Removed some old code and added new functionality to only find calendaritems for which a uid is specified using a calendarview.
This improves speed when a new recurring event is created. It will only load a small time period.

Signed-off-by: Michel <info@1st-setup.nl>
Update to use new uid filter on findcalendaritems request.
Improves speed when we see a new master item and we need to get the occurrences.

Signed-off-by: Michel <info@1st-setup.nl>
remove some debug code

Signed-off-by: Michel <info@1st-setup.nl>
Fixes Bug 397: Blank body with "Convert To" command from mail to Events

Signed-off-by: Michel <info@1st-setup.nl>
Improved memory usage on default settings.
When list filter is set to all events then only a minimum of 5 weeks before now and 5 weeks after now is selected.
When a larger period is available in memorycache than that period is returned.

Signed-off-by: Michel <info@1st-setup.nl>