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-state.h b/model/sync-state.h
index 2806fdb..f01e744 100644
--- a/model/sync-state.h
+++ b/model/sync-state.h
@@ -25,6 +25,7 @@
 
 #include "sync-state-leaf-container.h"
 #include <boost/exception/all.hpp>
+#include "boost/tuple/tuple.hpp"
 
 /**
  * \defgroup sync SYNC protocol
@@ -48,7 +49,7 @@
    * @param info name of the leaf
    * @param seq  sequence number of the leaf
    */
-  virtual bool
+  virtual boost::tuple<bool/*inserted*/, bool/*updated*/, SeqNo/*oldSeqNo*/>
   update (NameInfoConstPtr info, const SeqNo &seq) = 0;
 
   /**