Refactor: libcrmcommon: New pcmk__xml_copy()
Accepts a NULL src argument and NULL-checks doc. Replaces copy_xml().
It also accepts a parent argument, which is currently always NULL. This
is in anticipation of replacing add_node_copy() as well. The resulting
structure is similar to that of create_xml_node().
At first I tried to make this pcmkxe_copy() and require that the src
argument be an element node. However, it turns out that we're also
copying (at least) comment nodes (see pcmkxc_update()).
Note: We should either assert on NULL in create_xml_node() or NOT assert
on NULL in pcmk__xml_copy(). Not sure which approach we want to take.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>