s3:registry: fix seqnum race in fetch_values_internal
This prevents race between fetching seqnum and key content.
Because there is currently no way to atomically fetch the
record along with the seqnum, I use a loop.
This is far from optimal and should should ideally be done
differently. But for now it fixes the race.
(cherry picked from commit
13bccba3c2f6e6fdda2b4a40dd4b1e250a98a7ef)
Conflicts:
source3/registry/reg_backend_db.c
(cherry picked from commit
11413a95a2db14ef14a8f8f4fcb1f11adf44e7a0)