Clean up bytebuf new and write methods.

    nxn_bytebuf * nxn_bytebuf_new(void)

changed to

    nxn_bytebuf * nxn_bytebuf_new(const void *, size_t size)

to allow initialization of bytebuf.  This initialization uses a new function,
nxn_mem_xcopy().