libsa: Fix a bug in nvlist creation
Patch picked from FreeBSD:
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.
Testing done: build/install/boot.