Refactor: various: Use XML_ATTR_ID instead of id literal for XML
And in log/output messages that are formatted like XML. Ignore "id=" in
regular log/output messages (ones that aren't enclosed in angle brackets
or in XPath notation).
A handful of related cleanups when they're in the same line or very
close by.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>