tree data OPTIMIZE duplication of a hash table

Allocate the exact amount of memory for a new hash table as was
allocated for the old one at once.
diff --git a/src/tree_data_hash.c b/src/tree_data_hash.c
index ce237b1..9be655c 100644
--- a/src/tree_data_hash.c
+++ b/src/tree_data_hash.c
@@ -84,7 +84,7 @@
  *
  * Implementation of ::lyht_value_equal_cb.
  */
-static ly_bool
+ly_bool
 lyd_hash_table_val_equal(void *val1_p, void *val2_p, ly_bool mod, void *UNUSED(cb_data))
 {
     struct lyd_node *val1, *val2;