Check for resize path on libvirt instance delete

If an instance is deleted after the instance's disk image path has
been renamed by adding the "_resize" suffix to it but before the
resize operation completes, the libvirt driver will not delete the
orphaned files and manual intervention is needed to get them deleted.

This fix addresses the issue by attempting to rename the instance path
by adding a "_del" suffix and if that fails, renaming the instance path
with the "_resize" suffix by replacing the "_resize" suffix with the
"_del" suffix.  If both renaming operations fail, the sequence is
repeated, in case the the disk image path initially had the "_resize"
suffix and another thread removed it before the second rename operation
was attempted. These rename operations are used in favor of checking
for the existence of paths and deleting if found, because rename
operations are atomic whereas another thread could rename the path
between the exist check and the deleting.

Regardless of the outcome of the renaming operations, the existence of
the instance path with the "_del" suffix is verified and if it exists,
it is deleted. This is done in case a prior delete operation that
managed to create the "_del" path was subsequently interrupted before
all instance files could be deleted.

Note that the LibvirtConnTestCase.test_delete_instance_files test case
was removed in order to eliminate redundancy.

Closes-Bug: #1308565

Change-Id: Ifcb2e18211347ccf3e5472779c5917a729a6eced
Merge "Check for resize path on libvirt instance delete"