Add zab state callback (LOOKING/LEADING/FOLLOWING)

@fpj  @fengjingchao  Last week michi discussed this with me. Here I open the issue to bring everyone to same page and ask for suggestions.

Our current StateMachine interface looks like : 
```
public interface StateMachine {
  ...
  ByteBuffer preprocess(Zxid zxid, ByteBuffer message);
  ...
}
```

The client's preprocess callback will be called to convert the requests to idempotent transactions. Clients will convert requests to transactions based on their current application state. Since Zab allows multiple outgoing transactions at same time, the clients' current application state can't reflect all the changes made by clients, there may be some pending transactions which are not applied yet. So we may modify the interface to something like : 
```
public interface StateMachine {
  ...
  ByteBuffer preprocess(Zxid zxid, ByteBuffer message, List<ByteBuffer> pendingTxns);
  ...
}
```

It seems ZK does the same thing, as michi pointed out in #56 .

I think this interface is fine, but it's not very user friendly. Please let us know if you have any suggestions. Thanks!