ReplicatedPG: avoid undefined behavior in xattr cmp

Reading past the end of a pointer returned by string.data() in c++98 is
undefined. This value is passed to strcmp later, so simply use the 
NUL-terminated c_str() instead.

Fixes: #7250 Backport: dumpling Signed-off-by: Josh Durgin
<josh.durgin@inktank.com>