[WIP] Fix ht interface

Resubmit from #105 onto master
Maybe this function should use the same semantics `avl_del` uses now: take a predicate, instead of cmp and hash, and return the number of element removed. This way we can easily emulate the old behaviour while gaining new possibilities. However, this also slows things down because every bucket has to be accessed.
Maybe we should have two functions: one to remove elements based on a predicate and one based on a comparable. We could adapt the avl interface to have both versions, too.