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)
Why not deprecated? Our `Entities` class is too much a dumping ground of all methods relating to Entities. If we can move things to sensible other classes (of which `BrooklynShutdownHooks` felt like a good one) then it makes this class more manageable.