nvtable: fix an NV registry corruption in the unit tests

nv_registry_add_alias() used the passed in pointer to the alias verbatim,
without copying it.  However the unit test program generated alias names
dynamically, e.g.  editing the memory area that was used to store the hash
table key.

Since this wasn't intuitive at all, this patch changes the code so that the
key in the NV registry is now always duplicated before insertion.

Signed-off-by: Igor Ippolitov <iippolitov@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>