CA-143836: Add VDI.revert to SMAPI

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Add VDI.revert API call

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Pass down correct values of is_a_snapshot/snapshot_of

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Allow VDI.revert operation for cloneable snapshots

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: During VDI.revert, mark leaf with operation `reverting

This mirrors the way allowed_operations are handled for VM.revert.

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Add vdi_revert to SR allowed_operations

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Add VDI.revert test to quicktest

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Use VDI.revert

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Allow reverting to "live" VDIs

Since we can only revert to snapshot VDIs, the only time this is needed
is when reverting to a checkpoint.

Signed-off-by: John Else <john.else@citrix.com>
unittest: Variable rename and label for clarity

Signed-off-by: John Else <john.else@citrix.com>
unittest: Get VDI record after tinkering with the VDI

This ensures that the up-to-date record is passed to
Xapi_vdi.check_operation_error.

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Add allowed_operations tests

Test that we...

* can revert to a snapshot.
* can revert to an attached snapshot.
* cannot revert to a leaf VDI.
* cannot revert to an attached leaf.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1935 from johnelse/ca-143836-xs64bit

CA-143836: Fix up snapshot_of links after reverting to snapshot