core: call "callback_free" in functions arraylist_{remove|clear|free}

This fixes a memory leak in completions which are using this callback
to free words in the completion list.