This makes the nvlist code easier to reuse elsewhere. In particular,
the implementation in sys/contrib/libnv does not provide XDR encoding,
but this is needed when reading from or writing to ZFS pools.
Also:
- Remove references to boolean_t. It has to be a 32-bit int here, so just reference the underlying type.
- Add includes needed when compiling the nvlist code outside of stand/.
No functional change intended.