libsa: Fix a bug in nvlist creation
When adding an entry to an nvlist, the data buffer might need to be
resized. When this happens, the XDR encoder's notion of the buffer size
also needs to be updated, otherwise the operation may erroneously fail.
Reviewed by: tsoome, imp
Sponsored by: The FreeBSD Foundation
(cherry picked from commit bcc3148c70c72cc409881e7a25e2bb053a39a0da)