Fix signature of IODestroyFunction

All functions used as IODestroyFunctions don't return int but void.
Rename FreeFunction to ItemDestroyFunction

This function was never used to free memory directly, but to destroy an
item when it is removed from the container that owns it.