Merge pull request #102 from EasonLiao/master

clean up cluster state change callbacks
Server can leave in reconfiguration.
Refactoring code
Merge pull request #109 from EasonLiao/refactory

Refactory
Use ParticipantState object to share states among different instances of Participants.