operation: Add OperationContext
operation: Add OperationContext

An operation context represents a context in which an operation has been
applied.

Upon receiving operations from a remote site, the client must verify the
integrity of the sequence of operations, while discarding operations
that have already been received. In order to meet these requirements,
'localMsgSeqNo' of an operation context is needed to indicate the local
context of the site creating the operation.

If the client has received operation contexts with a greater sequence
number than what 'localMsgSeqNo' indicates, it can assume that those
operations have already been processed. On the other hand, if the client
receives a context with an unexpected 'localMsgSeqNo', it can assume
that one or more operations have not been received.

Also, it is important to keep track of which operations have been
processed at a remote site. Operations originating from the client that
have yet to be processed by a remote site are subject to transformation,
and 'remoteMsgSeqNo' is used for indicating which of the (remote)
operations at a remote site have been processed.

Signed-off-by: Karim Osman <94396faf6cc817be76165477038b3cfa832e89a4@reaktor.fi>
Acked-by: Aki Saarinen <2c8035bb80cf98a391872dcbe797b269d759f6d9@reaktor.fi>

akisaarinen/ccf,akisaarinen/ccf