Refactor: libpacemaker: Functionalize part of sort_clone_instance()
The sort_clone_instance() function is unwieldy. There's a large segment
near the end that's conveniently broken into its own block and lends
itself to a separate function.
As an aside, it was surrounded in an if (node1 && node2) guard. But if
both of them are NULL, we have already returned by the time we reach
this block.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>