Moving some logic of dealing with sequence numbers to SyncAppDataFetch

Adding recursive mutexes to SyncLogic, so hopefully it is now thread-safe

Small modification of publishing/retrieval names. Now session ID is
appended by SyncAppDataFetch / SyncAppDataPublish
diff --git a/model/sync-diff-state.cc b/model/sync-diff-state.cc
index 65323d3..a804a8e 100644
--- a/model/sync-diff-state.cc
+++ b/model/sync-diff-state.cc
@@ -61,7 +61,7 @@
 }
   
 // from State
-bool
+boost::tuple<bool/*inserted*/, bool/*updated*/, SeqNo/*oldSeqNo*/>
 DiffState::update (NameInfoConstPtr info, const SeqNo &seq)
 {
   m_leaves.erase (info);
@@ -69,7 +69,7 @@
   DiffLeafPtr leaf = make_shared<DiffLeaf> (info, cref (seq));
   m_leaves.insert (leaf);
 
-  return true;
+  return make_tuple (true, false, SeqNo ());
 }
 
 bool