Allocate memory and copy the xhash node key.

This change breaks away from relying on the user supplied memory storing
the key to exist for the lifetime of the xhash node object. There are
many scenarious where such a scheme is not favorable. The changes involve
duplicating the key in new memory which is then managed alongside the
lifetime of the node.