avoid implicit pointer to bool conversion
clear structures before freeing them
simplify ht_table_insert2()
add ht_table_remove2()