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 an example of a write that happens before this method is called? Is it just the `ManagementPlaneSyncRecordPersisterToObjectStore`?

First impression of this method is confusing.
Also, "without triggering backup" - is that true? In `FileBasedObjectStore` if `deferredBackupNeeded==true` then it will do the backup in this method impl.

Could we trigger backup explicitly when this management node is taking over as master? i.e. instead of waiting for the first checkpoint/delta from the management node (and calling this method every time, with subsequent calls being no-ops) then we just have an explicit `backup()` method. That would feel like simpler to understand.

Also, I'm fine with us creating a backup on rebind, even if the management node then doesn't actually write any data. That feels like an unusual case, and rebind shouldn't be happening that often.