Azure/azure-mobile-services — pull request #334 by deadalusai (2014-07-30 23:56:17+00:00)
Title: Fix issues with Sqlite sync __settings table

This pull-request fixes two issues I encountered with the sqlite sync:

- SetSetting did not update the local in-memory cache. Subsequent syncs would then use out-of-date data and re-fetch unnecessary records.
The fix is to update the in-memory cache whenever SetSettng is invoked.

- DateTime values stored in the Sync table were not serialized in a round-trippable manner. Because timezone information was stripped and the values were always later interpreted as being UTC the delta value used for subsequent incremental syncs would be incorrect.
The fix is to use JSON.Net to serialize all values going into the __settings table, which correctly round-trips DateTime values. This has the added benefit of increasing the accuracy of serialized DateTime values.