Bug: tools: Clear all prefer constraints when performing a move
A move is implemented in terms of perfer constraints. If those
constraints contain something like a lifetime expression, and older
prefer constraints are not cleared out, the result is a mess. The XML
that is attempted to insert into the CIB will contain both the older
constraint and then the new lifetime expression as sub-nodes of that
constraint. This is invalid, so the CIB will throw it out.
The fix is to make sure there are no prefer constraints for any nodes
when a move is done.
Most ban constraints are left alone, because they may still be valid -
you may want to move a resource to one node while preserving the ban on
another node. Taking care of this is the bulk of the complexity in this
patch.
One further note - any ban constraints on the destination still need to
be removed. Having both a ban and a prefer constraint on the same node
may technically be valid XML, but doesn't make any sense.
See rhbz#1648620