hashtable:added remove function

Handles allow_duplicate is true or false cases.