CA-116583: Write xenopsd DB objects atomically

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>