Added a ShutDown message to gracefully stop a RaftActor. If the leader,
it attempts leadership transfer as follows:
1) Send a LeaderStateChanged message with a null leader Id to the local
RoleChangeNotifier. This will cause the ShardManager to clear it's
cached leader state and primaryInfoCache.
2) Send a LeaderTransitioning message to each follower so each can send
LeaderStateChanged messages to their local RoleChangeNotifiers.
3) Call a protected method, pauseLeader, passing the
RaftActorLeadershipTransferCohort. This allows derived classes to
perform work prior to transferring leadership. The Shard will wait for
current transactions to complete.
4) After pause is complete, the run method on the
RaftActorLeadershipTransferCohort is called which in turn calls
transferLeadership on the Leader.
5) When transfer is complete, send a PoisonPill to self.
If not the leader or has no followers, it just calls pauseLeader an
sends a PoisonPill on completion.
Change-Id: I27fa8a95f260b75516b7e558caea4a1a3255dda3
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>