Refactor: libcrmcommon: simplify XML filtering code
Move code related to filtering XML attributes that aren't needed for
CIB digests to digest.c, functionizing to simplify, reduce code duplication
and improve readability.
In the theoretical case where an XML element contains more than one instance of
a filterable attribute with the same name, the previous code would filter the
first instance only. However that should not be possible in practice, so now
all instances are filtered, to simplify the code (and make more sense).