fixed #1464 - change so persistence dir is only backed up if node is HA ...

...master or HA disabled; handles the case of HA autodetect selecting master hence the complexity.

also fixes some leaks in test and improves atomic file update support in FileBasedObjectStore.
(incorporates new logging from #1469)
What is reasoning for `"file system not recommended for production HA/DR"`? If just this management node is writing to the shared NFS then it will be ok (because atomicity is ensured in our code). If multiple management nodes are writing to the shared file system, then they'll write to different tmp files (with the management node id in the name - at least that is what it used to do). So I presume it is a last-write wins. What problem are we seeing with the file system HA?