reorganize the cluster management code and add sample for hazelcast
fix hazelcast to shutdown and release the resource properly