CA-116583: Write xenopsd DB objects atomically

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #29 from jonludlam/CA-116583

CA-116583: Write xenopsd DB objects atomically