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.
vec: make unsafe indexing functions higher-level
add new vector representation as a library
hashmap: port to Vec<T>