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)
We still do this, inside `destroyAndWait` -- is that not enough?  If someone interrupts the mutex acquisition then it bails, do you think we need to try to catch that also?  seems a fringe case to me.