Initial commit of ChronoSync and ChronoChat ported from ChronoChat-js. This runs, but still debugging and developing.
Merge branch 'master' into chrono-sync, including contrib/gtest.
Merge branch 'master' into chrono-sync
util/chrono-sync: In DigestTree make member variables private, add getter methods.
util/chrono-sync: In DigestTree::Node rename to getSequenceNo and getSessionNo.
util/chrono-sync: In DigestTree centralize the code for recomputeRoot() and Node recomputeDigest(). Automatically compute the node digest in the constructor and setSequenceNo.
util/chrono-sync. In ChronoSync, make digest_tree_ private, added update method.
util/chrono-sync: Make DigestTree::update do a single update with explicit prefixName, etc. And make ChronoSync::update go through the list of SyncState.
util/chrono-sync: Remove DigestTree::initial(ChronoSync&) since we can now call update directly. This removes the dependency of DigestTree on ChronoSync and Sync::SyncState.
util/chrono-chat: Make ChronoSync::flag_ private and added getFlag().
util/chrono-sync: Renamed ChronoSync::prefix_ to broadcastPrefix_, made private and added getBroadcastPrefix().
util./chrono-sync: In ChronoSync::DigestLogEntry, make digest_ and data_ private and add const get methods.
util/chrono-sync: In DigestTree, rename prefix_name to namePrefix.
util/chrono-sync: Remove ChronoChat::prefix_name and just call Chat::getRandomString() when setting the chat prefix.
util/chrono-sync: In ChronoSync::initialTimeOut, check that the created content sequence number is 0 and call update with the created content
util/chrono-sync: Move the initialization of the digest log from ChronoChat to the ChronoSync constructor.
util/chrono-sync: Make ChronoSync::update also update the digest log and return true if the log is updated. Removed addDigestLogEntry since it is handled by update.
util/chrono-sync: In ChronoSync, added publishNextSequenceNumber and use in Chat. Added getSequenceNumber() and make usrseq_ private. This allows us to remove the public pokeData method. We can also make update and logfind private.
util/chrono-sync: In ChronoSync, make the following methods private: processRecoveryInst, processSyncInst, sendRecovery, judgeRecovery, syncTimeout and initialOndata.
util/chrono-sync: Make the class CronoSync::DigestLogEntry private.