optimized the implementation for hashtable

1. add the ref_cnt field into hashtable to count the references
2. the pointer array of hashtable should be applied dynamically
3. add the hashtable destroy feature