A hostname or name is passed to the unprovision call, and the node is
looked up by allocation name (hostname), falling back to node name.
This can result in the wrong node being unprovisioned in the following
scenario:
* node and hostname naming scheme are identical
* node and hostname names are mixed because allocation placement
doesn't take the node name into account
* a node has already been unprovisioned by hostname (allocation)
lookup
* unprovision is performed a second time, this time matching the
hostname with a different node's name
* the wrong node is unprovisioned
The unprovision_node method can also take a node object instead of a
string identifier, so this change does a precise node lookup before
calling it. This means only hostnames are used for allocation lookups,
and node names for node lookups.
Change-Id: I9507f8d30c871ae62a250148789393695d59183a
Resolves: rhbz#2092444