Implement graceful exit when zk session expired
Merge pull request #519 from gintenlabo/exit-gracefully-when-zk-session-expired

Implement graceful exit when zookeeper session have expired (fixes #504)