Refactor: libcrmcommon: Return standard code from pcmk__scan_nvpair()
And improve error checking.
There are only two callers, and both of them only cared whether the
return value was 2. So now we return pcmk_rc_ok where we previously
would have returned 2, and we return a standard Pacemaker error code
otherwise.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>