Refactor: libcrmcommon: Separate XML tree traversal from work
Create a new pcmk__xml_tree_foreach() helper that applies a function to
each node in an XML tree until the function's return value tells it to
stop or it has finished traversing the tree.
This will be used outside of xml.c, hence non-static.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>