Refactor: libcrmcommon: Use regex for pcmk__compare_versions()
Seems a bit more readable and a bit less error-prone, even though it's
less efficient.
I started out trying to use a GRegex, which works great except that it
requires freeing and reallocating a GMatchInfo struct every time you
reuse the regex to match a later offset of the same string. We don't
need the fancy PCRE features anyway.
I started working on an implementation that just uses
pcmk__numeric_strcasecmp(), but it started getting ugly for things like
"1" vs. "1.0", since it treats all non-digit characters equally (in
particular, it doesn't treat dots specially).
pcmk__compare_versions() could also reasonable go into strings.c, by the
way.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>