esql_model: Alloc hash data in heap and set free callback function, called from destructor.