Sync ported from .NET,  Keystream encryption fixed, On receipt event added, Added photo support for vCard, Thumbnails for videos fixed