Fix free before hashmap_remove bug

This issue Was causing buxtond to segfault if register_notification and
unregister_notification was called on a give key, then set_value.
Fixes this wrongly timed free