added release/destroy functionality to as_val_hashmap like as_hashmap

* avoid possible arith exception in hash map resize function
add same capacity logic to val_hashmap_init as resize