xenapi: refactor detach volume

Share more code between detach and detach_all, and make it easier to
read. At the same time, improve the test coverage.

When introducing the new tests, I created a common test base class,
VolumeOpsTestBase that matches VMOpsTestBase.

Change-Id: I7c9d677e7b589b525e2c6ebc43ef81a64a57511d
Updated from global requirements

Change-Id: Id6c1d78075f2165a84d6095f050550a31573b9ef
Merge "xenapi: refactor detach volume"
Merge "Updated from global requirements"