Fix: crmd: cl#5185 - Record pending operations in the CIB before they are performed
Although we had the assurance of CPG, there was the race condition that
the peer received the lrm_invoke request from the DC, got the operation
performed, returned and updated into the CIB very fast, even before
the pending operation was injected into the CIB. The late pending
operation would override the real result of the operation and get
stalled in the CIB, which would basically tell the wrong state of the
resource.
The idea of this fix is to record the pending operation from the node
where the operation will be performed rather than from the DC, and right
before it's performed, to avoid the race condition.