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 remove the handling of `InterruptedException`? Previously, if you did `cntrl-c` then it would/should interrupt waiting for the entity.stop to complete, but would then do the managementContext.terminate (having first marked this thread as `Thread.currentThread().interrupt()`). That feels like the right behaviour to me - i.e. if we are interrupted, then keep trying to finish the shutdown but with our current thread interrupted so we won't do any nasty blocking.