Persist thread improvements/Backup support

* adds backups of persist files
* adds persist settings do domain settings page
* does a final persist when assignment client is about to finish.
* fixes a potential crash on pruneTree in persist operation which wasn't properly locking the tree for write