Fixed #299 Improve Retry behavior

1. Retry new replication session if previous session ends with error see ReplicationInternal.java
2. Apply same retry logic in a replication session. see RemoteRequestRetry.java
> I am not comfortable to add new trigger for state machine.

I realize it may be more work, but I think we should try it in the first pass in order to keep as much logic in the state machine handlers as possible, which will reduce code duplication.

Check the other triggers for examples.  Just do a "find usages" on some of the other triggers and study the places they are used.  I will review in case you miss something.