Fix Nova rescheduling tear down problem

If something fails in the spawn() method (e.g driver parameters, node
in maintenance mode) nova will try to rescheduler the instance (in case
the retry filter is enabled) as part of the rescheduling process nova
will call destroy() on that instance which was cause another problem
when Ironic tried to undeploy a node that wasn't deployed. This patch
is fixing the tear down problem by checking the provision_state of the
node before requesting Ironic to undeploy the node.

Also, the relevant code and tests underwent some refactoring to make
the code shorter and less nested.

Closes-Bug: #1300288
Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
Change-Id: I4c7037d6c7b99548a646ef6665b29479277fb4d5
Replace sfdisk with parted

Replace the current sfdisk which is broken with parted. This patch is
a short-term fix for the Icehouse RC1 release.

Closes-Bug: #1297925
Change-Id: I0c3763db0e29f58b33e998d1f7efb23337604960
Merge "Replace sfdisk with parted"
Merge "Fix Nova rescheduling tear down problem"