Return a value from StateMachine.applyOperation, use that for Future result

Wait until the result has been applied to the StateMachine, not just committed to the Raft log.  This is important e.g. for Read-Your-Writes.

A failure to reach a quorum of peers will set the Future to an Exception result.