VOL-1372 : Fixed core crash due to how revisions are updated

- UpdateChildren merges new and existing entries
- proxy access control singleton now uses sync.Map since the
  entry was intermittently losing its content
- Switch to AddWithID in the device_agent to ensure thread safety

Change-Id: Ifcb2374f48b612a487a00f4a952aeec21d1c4af1
diff --git a/rw_core/core/device_agent.go b/rw_core/core/device_agent.go
index 13e0adf..3ccf808 100644
--- a/rw_core/core/device_agent.go
+++ b/rw_core/core/device_agent.go
@@ -78,7 +78,7 @@
 	defer agent.lockDevice.Unlock()
 	log.Debugw("starting-device-agent", log.Fields{"device": agent.lastData})
 	// Add the initial device to the local model
-	if added := agent.clusterDataProxy.Add("/devices", agent.lastData, ""); added == nil {
+	if added := agent.clusterDataProxy.AddWithID("/devices", agent.deviceId, agent.lastData, ""); added == nil {
 		log.Errorw("failed-to-add-device", log.Fields{"deviceId": agent.deviceId})
 	}
 	agent.deviceProxy = agent.clusterDataProxy.Root.CreateProxy("/devices/"+agent.deviceId, false)