hashmap: introduce hashmap_free_entries