Properly free up the memory used by the hash table.