Also ports the cache-clear hook to Annotated's custom-events. No backward compat for old-style commandfiles but that could come back if we want.
Port cache commands to Annotated.
Remove a code comment.
Remove old file.
Misc minot fixes and renames.
Update to new cache clear method
Remove debug code.
Cast topic element to a bool to match old API