libc: switch `free` to the proper signature

This does not attempt to fully propagate the mutability everywhere, but
gives new code a hint to avoid the same issues.
add new vector representation as a library
hashmap: port to Vec<T>