Clean up tasks in shutdown hook.

When the shutdown hook is called, perform a clean shutdown of services
to allow cluster listeners to be called appropriately instead of simply
removing the ephemeral node in ZK.
Merge pull request #27 from pkwarren/cleaner_shutdown

Clean up tasks in shutdown hook.