Refactor: libcrmcommon: Best practices in pcmk__alert_in_patchset()
Use const where possible. Functionize v1 and v2 logic. Use better
default for rc. Error-check rc getter. Use CIB XPath getter functions
for maintainability. Iterate over only XML_DIFF_CHANGE elements for v2.
Use true/false. Use pcmk__starts_with() instead of strstr(). Clarify
test conditions.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>