Fix memory leak in NewCountNotifier.

NewCountNotifier was never deleted because it never emitted any signals.

Original Author: Slava Monich <slava.monich@jolla.com>

Change-Id: I4e85256c4e40b0c386ce6f58f7a9a1637217dd16
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
fix read status sync error on large batches

Updating thousands of read statuses leads to "too many SQL
variables"-error. This fix updates variables in batches.

Change-Id: I115962a525571f969f989c4cca2b3ddca24c657c
Reviewed-by: Valerio Valerio <valerio.valerio@jollamobile.com>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Fixed a crash in PopClient::incomingData

Transport might be deleted by processResponse/operationFailed, so we
have to check it after processResponse returns. This happens, for instance,
if invalid credentials are provided.

Change-Id: I9315e9c8644273ffc0997f91c5c8cf4d2face975
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Change IMAP4 default for auto download small attachments.

This commit turns off auto download of small attachments.
Downloading small attachments without user permission is not a
desired behavior, some emails contain logs or small images that
will be always download without user permission in this case.

Change-Id: Iaef7eb27f634b4f2594f61955c1468d45fa409e8
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Fields which are matched case-insensitive should sort similarly

Text fields that are matched with case-insensitive matching should
also be sorted with case-insensitive collation.

Also includes fix to extend case insensitivity to matching for mail
thread keys.

Includes test fixes from Valerio.

Change-Id: Id4921d1249bf10957b6f78f16168f786cbe9849d
Reviewed-by: Valerio Valerio <valerio.valerio@jollamobile.com>
Update QPrivateImplementationPointer to match QSharedDataPointer

QPrivateImplementationPointer is a modified variant of QSharedDataPointer
that uses a custom deleter and supports incomplete pointee class.
Update the QSharedDataPointer code to match the current version
from qtbase.

Also remove an unused constructor from QPrivatelyImplmented.

Change-Id: I0e21a06dc6890dbf698b695f55b4a14c5071d2fc
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Make implementation header private

qprivateimplementationdef_p.h should not be exported as a public
hedaer, as it is an implementation detail.

Change-Id: Ie03548d15428d467db4b8d084bd7f2a184baac91
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>