Use the coordination module to manage restarting the rabbitmq
services. This is to ensure that restarts are only
performed on one unit at a time. This helps prevent
situation which can cause the cluster to become split
brained (eg if two or more nodes are restarted at the same
time).
* Manually run _run_atstart & _run_atexit method when actions
are run as this does not happen automatically and is needed by
the coordination layer.
* Replace restart_on_change decorator with
coordinated_restart_on_change. coordinated_restart_on_change
includes logic for requesting restart locks from the coordination
module.
* The coordination module works via the leader and cluster events so
the hooks now include calls to check_coordinated_functions
which will run any function that is waiting for a lock.
* Logic has been added to check for the situation where a hook is
being run via the run_deferred_hooks actions. If this is the
case then restarts are immediate as the action should only be run
on one unit at a time.
Change-Id: Ia133c90a610793d4da96d3400a3906b801b52b73