Fix: libcrmcommon: Prevent buffer overflow in pcmk__element_xpath()
Use GString instead of snprintf() with a buffer and offset, so that we
can easily and dynamically grow to meet our string size needs.
When a string is only used or tracing, do not build the string unless
tracing is enabled. We want to avoid the overhead. See the
pcmk__log_else() calls.
Ref T152
Resolves RHBZ#1822125
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>