s3:dbwrap: convert dbwrap_util.c to use dbwrap wrapper functions