Bug 2495: Add a listener for zookeeper events during master election. If connection is lost and restablished, we need to call master election again